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:
hawk259 2018-01-05 17:29:57 -05:00 committed by Paulus Schoutsen
parent 455c629f47
commit 417c193c0d

View File

@ -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."""