Skip to content

Commit 54d5917

Browse files
committed
Restore slot visibility independently from hide_if_zero
1 parent 744d5af commit 54d5917

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

nspanel_easy_blueprint.yaml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7457,28 +7457,24 @@ actions:
74577457
else "_{_unavailable_}_"
74587458
}}
74597459
continue_on_error: true
7460-
# Restore visibility for zero → non-zero transitions
7461-
- if: '{{ hide_if_zero is defined and hide_if_zero }}'
7462-
then:
7463-
- *delay_default
7464-
- action: 'esphome.{{ nspanel_name }}_components_visibility'
7465-
data:
7466-
page: '{{ repeat.item.page }}'
7467-
ids:
7468-
- '{{ repeat.item.component }}'
7469-
- '{{ repeat.item.component }}_icon'
7470-
visible: true
7471-
continue_on_error: true
7460+
# Restore visibility after any displayable state (e.g. zero → non-zero transition)
7461+
- *delay_default
7462+
- action: 'esphome.{{ nspanel_name }}_components_visibility'
7463+
data:
7464+
page: '{{ repeat.item.page }}'
7465+
ids:
7466+
- '{{ repeat.item.component }}'
7467+
- '{{ repeat.item.component }}_icon'
7468+
visible: true
7469+
continue_on_error: true
74727470
else:
7473-
# No value (unavailable/unknown): hide both value and icon
7471+
# No value (unavailable/unknown): show localized marker
74747472
- *delay_default
7475-
- action: 'esphome.{{ nspanel_name }}_components_visibility'
7473+
- action: 'esphome.{{ nspanel_name }}_component_text'
74767474
data:
74777475
page: '{{ repeat.item.page }}'
7478-
ids:
7479-
- '{{ repeat.item.component }}'
7480-
- '{{ repeat.item.component }}_icon'
7481-
visible: false
7476+
id: '{{ repeat.item.component }}'
7477+
txt: '_{_unavailable_}_'
74827478
continue_on_error: true
74837479

74847480
## BUTTON PAGES 01 - 04 ##

0 commit comments

Comments
 (0)