mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 14:57:09 +00:00
commit
6149e509c3
@ -59,6 +59,15 @@ class TimeDateSensor(Entity):
|
|||||||
""" Returns the state of the device. """
|
""" Returns the state of the device. """
|
||||||
return self._state
|
return self._state
|
||||||
|
|
||||||
|
@property
|
||||||
|
def icon(self):
|
||||||
|
if "date" in self.type and "time" in self.type:
|
||||||
|
return "mdi:calendar-clock"
|
||||||
|
elif "date" in self.type:
|
||||||
|
return "mdi:calendar"
|
||||||
|
else:
|
||||||
|
return "mdi:clock"
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
""" Gets the latest data and updates the states. """
|
""" Gets the latest data and updates the states. """
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user