Add support to logbook component to browse days
This commit is contained in:
parent
4b7f8ca39d
commit
8a14f46595
4 changed files with 72 additions and 38 deletions
|
@ -89,9 +89,9 @@ class TimeDateSensor(Entity):
|
|||
""" Gets the latest data and updates the states. """
|
||||
|
||||
time_date = dt_util.utcnow()
|
||||
time = dt_util.datetime_to_short_time_str(dt_util.as_local(time_date))
|
||||
time_utc = dt_util.datetime_to_short_time_str(time_date)
|
||||
date = dt_util.datetime_to_short_date_str(dt_util.as_local(time_date))
|
||||
time = dt_util.datetime_to_time_str(dt_util.as_local(time_date))
|
||||
time_utc = dt_util.datetime_to_time_str(time_date)
|
||||
date = dt_util.datetime_to_date_str(dt_util.as_local(time_date))
|
||||
|
||||
# Calculate the beat (Swatch Internet Time) time without date.
|
||||
hours, minutes, seconds = time_date.strftime('%H:%M:%S').split(':')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue