Skip to content

Commit

Permalink
Merge pull request #634 from ALERTua/state_exist
Browse files Browse the repository at this point in the history
adds state.exist classmethod to check whether an entity_id exists
  • Loading branch information
craigbarratt authored Sep 11, 2024
2 parents 8414059 + 646bded commit f1b31a5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/pyscript/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ def register_functions(cls):
"state.get_attr": cls.get_attr, # deprecated form; to be removed
"state.persist": cls.persist,
"state.delete": cls.delete,
"state.exist": cls.exist,
"pyscript.config": cls.pyscript_config,
}
Function.register(functions)
Expand Down

0 comments on commit f1b31a5

Please sign in to comment.