mirror of
https://github.com/home-assistant/core.git
synced 2025-12-22 11:59:34 +00:00
Return attribute dict directly without temporary variable (#41206)
This commit is contained in:
@@ -120,8 +120,7 @@ class AlarmDecoderBinarySensor(BinarySensorEntity):
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
attr = {}
|
||||
attr[CONF_ZONE_NUMBER] = self._zone_number
|
||||
attr = {CONF_ZONE_NUMBER: self._zone_number}
|
||||
if self._rfid and self._rfstate is not None:
|
||||
attr[ATTR_RF_BIT0] = bool(self._rfstate & 0x01)
|
||||
attr[ATTR_RF_LOW_BAT] = bool(self._rfstate & 0x02)
|
||||
|
||||
Reference in New Issue
Block a user