diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 4fff37e..4013a84 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -4449,7 +4449,23 @@ action: {%- elif states(last_click) == "releasebuttonpage04button08" -%} {{ entity32_confirm }} {%- endif -%} - 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: - condition: template value_template: "{{ entity_confirm }}"