Skip to content

Commit

Permalink
Support power profile only for feeder owners
Browse files Browse the repository at this point in the history
  • Loading branch information
jhansche committed Apr 6, 2024
1 parent d7cbc8c commit 81f5b31
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/birdbuddy/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ def __init__(
def current_option(self) -> str | None:
return self.feeder.power_profile.value.lower()

@property
def available(self) -> bool:
return super().available and self.feeder.is_owner

async def async_select_option(self, option: str) -> None:
option = PowerProfile(option.upper())
assert option != PowerProfile.UNKNOWN
Expand Down

0 comments on commit 81f5b31

Please sign in to comment.