mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
input_datetime: Move has_date, has_time to capability_attributes (#58138)
This commit is contained in:
parent
acb24788d0
commit
4eea618cc4
@ -341,13 +341,19 @@ class InputDatetime(RestoreEntity):
|
|||||||
|
|
||||||
return self._current_datetime.strftime(FMT_TIME)
|
return self._current_datetime.strftime(FMT_TIME)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def capability_attributes(self) -> dict:
|
||||||
|
"""Return the capability attributes."""
|
||||||
|
return {
|
||||||
|
CONF_HAS_DATE: self.has_date,
|
||||||
|
CONF_HAS_TIME: self.has_time,
|
||||||
|
}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def extra_state_attributes(self):
|
def extra_state_attributes(self):
|
||||||
"""Return the state attributes."""
|
"""Return the state attributes."""
|
||||||
attrs = {
|
attrs = {
|
||||||
ATTR_EDITABLE: self.editable,
|
ATTR_EDITABLE: self.editable,
|
||||||
CONF_HAS_DATE: self.has_date,
|
|
||||||
CONF_HAS_TIME: self.has_time,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if self._current_datetime is None:
|
if self._current_datetime is None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user