Use assignment expressions 38 (#58828)
This commit is contained in:
parent
b6d9e517c2
commit
72801867d6
15 changed files with 26 additions and 54 deletions
|
@ -405,8 +405,7 @@ class Thermostat(ZhaEntity, ClimateEntity):
|
|||
# occupancy attribute is an unreportable attribute, but if we get
|
||||
# an attribute update for an "occupied" setpoint, there's a chance
|
||||
# occupancy has changed
|
||||
occupancy = await self._thrm.get_occupancy()
|
||||
if occupancy is True:
|
||||
if await self._thrm.get_occupancy() is True:
|
||||
self._preset = PRESET_NONE
|
||||
|
||||
self.debug("Attribute '%s' = %s update", record.attr_name, record.value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue