Skip to content

Commit

Permalink
Merge pull request #19 from basbruss/dev
Browse files Browse the repository at this point in the history
Add `input_boolean` to presence entity
  • Loading branch information
basbruss authored Dec 7, 2023
2 parents fb105c0 + 3f0484f commit 1d9ee8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions custom_components/adaptive_cover/calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ def is_presence(self):
return self.presence == "home"
if domain == "zone":
return int(self.presence) > 0
if domain == "binary_sensor":
return bool(self.presence)
if domain in ["binary_sensor","input_boolean"]:
return self.presence == "on"
return True

@property
Expand Down
2 changes: 1 addition & 1 deletion custom_components/adaptive_cover/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
),
vol.Optional(CONF_PRESENCE_ENTITY, default=[]): selector.EntitySelector(
selector.EntityFilterSelectorConfig(
domain=["device_tracker", "zone", "binary_sensor"]
domain=["device_tracker", "zone", "binary_sensor","input_boolean"]
)
),
}
Expand Down

0 comments on commit 1d9ee8b

Please sign in to comment.