So i have written my own custom component to link into my alarm system,
It all works but i am wondering can i set a custom icon to the states of a binary sensor
is there a def state_icon in a custom component?
@property
def state(self):
"""Return the state of the sensor."""
if self.yale_object[self.device_name] == "closed":
return "closed"
else:
return "open"