Use shorthand attributes in Starline (#99882)

This commit is contained in:
Joost Lekkerkerker 2023-09-08 01:16:35 +02:00 committed by GitHub
parent 4e826f1704
commit 92628ea068
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 15 deletions

View file

@ -77,6 +77,8 @@ class StarlineSwitch(StarlineEntity, SwitchEntity):
entity_description: StarlineSwitchEntityDescription
_attr_assumed_state = True
def __init__(
self,
account: StarlineAccount,
@ -108,11 +110,6 @@ class StarlineSwitch(StarlineEntity, SwitchEntity):
else self.entity_description.icon_off
)
@property
def assumed_state(self):
"""Return True if unable to access real state of the entity."""
return True
@property
def is_on(self):
"""Return True if entity is on."""