upd: open climate on short_press too

This commit is contained in:
deejaybeam
2023-02-11 19:02:19 +01:00
parent da611e384a
commit c058fd4fb1

View File

@@ -4449,7 +4449,23 @@ action:
{%- elif states(last_click) == "releasebuttonpage04button08" -%} {{ entity32_confirm }} {%- elif states(last_click) == "releasebuttonpage04button08" -%} {{ entity32_confirm }}
{%- endif -%} {%- endif -%}
- condition: template - condition: template
value_template: '{{ entity_short |length > 0 and entity_short is not match "person." and entity_short is not match "binary_sensor." and entity_short is not match "climate." }}' value_template: '{{ entity_short |length > 0 and entity_short is not match "person." and entity_short is not match "binary_sensor." }}'
- if:
- condition: template
value_template: '{{ entity_short is match "climate." }}'
then:
- variables:
entity_long: '{{ entity_short }}'
entity_long_name: >-
{%- if states(entity_short) == 'unavailable' -%} {{ entity_short }}
{%- else -%} {{ state_attr(entity_short, "friendly_name")| default('no name') }}
{%- endif -%}
entity_back: '{{ states(current_page) }}'
- service: '{{ command_set_settings_entity }}'
data:
entity: '{{ entity_long }},{{ entity_back }},{{ entity_long_name }}'
- condition: template
value_template: '{{ entity_short is not match "climate." }}'
- if: - if:
- condition: template - condition: template
value_template: "{{ entity_confirm }}" value_template: "{{ entity_confirm }}"