Input.datetime - remove seconds

is it possible to remove seconds

this dont work

{{ states(“input_datetime.test”) | timestamp_custom(’%H.%M’) }}

1 Like

Are you trying to do something like this?

      value_template: >
        {% set t_now = as_timestamp(now()) | timestamp_custom('%H:%M') %}
        {% set t_on = states('input_datetime.downstairs_ac_am_on_time') %}
        {% set t_off = states('input_datetime.downstairs_ac_am_off_time') %}
        {{ t_on <= t_now <= t_off }}

If so, you don’t actually need to remove the seconds.

it gives my text “false” ?

I want to show the input time in lovelace whitout seconds

I did ask:

You are not. So ignore that.

{{ state_attr("input_datetime.test", "timestamp") | timestamp_custom("%H.%M", False) }}
3 Likes