ianByrne / HASS-ukho_tides

Home Assistant integration for tide information
MIT License
27 stars 5 forks source link

[Feature request] Allow times to be displayed in time and date format option as well as counting down #13

Closed ashbrnet closed 1 year ago

ashbrnet commented 1 year ago

i am currently struggling with adding the attributes as a sensor to display High tide is at 11:50am on a card, i have tried to map as a template sensor to convert this but it refuses to work, an option attribute to say Next_High_Tide / Next_Low_Tide as a time value would be great. thanks

ianByrne commented 1 year ago

Hi @ashbrnet - you can use a template to display the next_high_tide_at attribute in any format you like, for example:

{{ as_timestamp(state_attr('sensor.station_tide','next_high_tide_at')) | timestamp_custom('%I:%M %p') }}

(be sure to update sensor.station_tide to your actual sensor name)