mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
AlarmDecoder remove icon function as BinarySensorDevice handles it correctly now (#11467)
* remove icon function as BinarySensorDevice handles it correctly now * removing _type, not used
This commit is contained in:
parent
455c629f47
commit
417c193c0d
@ -55,7 +55,6 @@ class AlarmDecoderBinarySensor(BinarySensorDevice):
|
||||
self._zone_type = zone_type
|
||||
self._state = None
|
||||
self._name = zone_name
|
||||
self._type = zone_type
|
||||
self._rfid = zone_rfid
|
||||
self._rfstate = None
|
||||
|
||||
@ -76,17 +75,6 @@ class AlarmDecoderBinarySensor(BinarySensorDevice):
|
||||
"""Return the name of the entity."""
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def icon(self):
|
||||
"""Icon for device by its type."""
|
||||
if "window" in self._name.lower():
|
||||
return "mdi:window-open" if self.is_on else "mdi:window-closed"
|
||||
|
||||
if self._type == 'smoke':
|
||||
return "mdi:fire"
|
||||
|
||||
return None
|
||||
|
||||
@property
|
||||
def should_poll(self):
|
||||
"""No polling needed."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user