Add attribute to show who last un/set alarm (SPC) (#9906)
* Add attribute to show who last un/set alarm. This allows showing the name of the SPC user who last issued an arm/disarm command and also allows for automations to depend on this value. * Optimize * Update spc.py * Update spc.py * fix * Fix test. * Fix for removed is_state_attr.
This commit is contained in:
parent
68fb995c63
commit
db56748d88
6 changed files with 82 additions and 45 deletions
|
@ -67,7 +67,7 @@ class SpcBinarySensor(BinarySensorDevice):
|
|||
spc_registry.register_sensor_device(zone_id, self)
|
||||
|
||||
@asyncio.coroutine
|
||||
def async_update_from_spc(self, state):
|
||||
def async_update_from_spc(self, state, extra):
|
||||
"""Update the state of the device."""
|
||||
self._state = state
|
||||
yield from self.async_update_ha_state()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue