diff --git a/ReleaseNotes.md b/ReleaseNotes.md
index a79d1eb..8034bf8 100644
--- a/ReleaseNotes.md
+++ b/ReleaseNotes.md
@@ -27,12 +27,10 @@ Updates may come with changes on the blueprint inputs and we highly recommend yo
### Instructions
_You can find the update procedures following here:_
-- [(EN) How To - All important thing you should know - Update](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-HowTo---All-important-thing-you-should-know#2-update-blueprint)
-- [(DE) How To - Alle wichtigen Dinge die man wissen sollte - Update](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(DE)-HowTo---Alle-wichtigen-Dinge-die-man-wissen-sollte#2-update-blueprint)
+- [How To - All important thing you should know - Update](docs/howto.md#update-blueprint)
## Breaking changes
-
1. Service `esphome.xxxxx_set_component_color` parameter `background` is deprecated.
2. Due to the additional custom buttons, the other buttons on home page changed their positions.
3. The Wi-Fi power save mode is back to "NONE" as default.
@@ -48,6 +46,7 @@ wifi:
```
4. Default baud rate for advanced mode is back to 115200 bps, to avoid issues when creating buttons pages.
5. ESPHome v2023.12.0 is now the minimum required version
+6. The Alarm section on the blueprint settings was removed and your previous selection was moved to custom button 07.
## Overview of noteworthy changes
@@ -57,6 +56,7 @@ wifi:
4. Select icon size for button's pages
5. Support to Chinese (Taiwan) and prepared for other CJK languages
6. Upload baud rate selectable as substitution
+7. Multiple Alarm Control Panels
## Details of noteworthy changes
@@ -66,7 +66,7 @@ The engine for defining the icons to be shown and it's color was standardize bet
### 2. Additional custom buttons on Home page
-It's that simple, now you have 6 buttons where used to be 3. 😉
+It's that simple, now you have 7 buttons where used to be 3. Well, where used to be 4, as the space previously used by the Alarm button is now a custom button. 😉
### 3. Outdoor temperature selectable font size
@@ -103,6 +103,10 @@ If an invalid value is entered or this substitution is not present, the current
The system will always fall back to the standard baud rate (115200 bps) if other tentatives fails.
+
+### 7. Multiple Alarm Control Panels
+Now alarm control panel entities can be assigned to chips and custom buttons in the Home page, but also to hardware buttons, any of the buttons pages or entities pages, similarly to other domains.
+
## What's Next?
Discover what's next and what we are working on right now in our [Milestones](https://github.com/Blackymas/NSPanel_HA_Blueprint/milestones?direction=asc&sort=due_date)
diff --git a/advanced/esphome/nspanel_esphome_core.yaml b/advanced/esphome/nspanel_esphome_core.yaml
index cf4975e..ea6940d 100644
--- a/advanced/esphome/nspanel_esphome_core.yaml
+++ b/advanced/esphome/nspanel_esphome_core.yaml
@@ -217,10 +217,6 @@ api:
mui_alarm: string[] #std::vector #std::map
then:
- lambda: |-
- // set alarm icon on home page
- disp1->send_command_printf("is_alarm=%i", (state == "" or state.empty()) ? 0 : 1);
- update_alarm_icon->execute("home.bt_alarm", state.c_str());
-
// Is page Alarm visible?
if (current_page->state == "alarm") // To do: This page constructor should be moved to Blueprint
{ // Update alarm page
@@ -578,7 +574,6 @@ api:
entities_pages: bool
entities_pages_icon: string
entities_pages_icon_color: int[]
- alarm_state: string
then:
- lambda: |-
static const char *const TAG = "service.page_home";
@@ -623,11 +618,6 @@ api:
//set_component_color->execute("home.bt_entities", entities_pages_icon_color);
set_component_color->execute("home.bt_entities", entities_pages_icon_color);
- // Alarm button
- ESP_LOGV(TAG, "Set Alarm button");
- disp1->send_command_printf("is_alarm=%i", (alarm_state == "" or alarm_state.empty()) ? 0 : 1);
- update_alarm_icon->execute("home.bt_alarm", alarm_state.c_str());
-
#### Service to populate the page Settings #####
- service: page_settings
variables:
@@ -1513,28 +1503,22 @@ text_sensor:
int embedded = doc["embedded"];
std::string service = "";
- // send event to Home Assistant
+ // send event to Home Assistant #DEBUG
auto ha_event = new esphome::api::CustomAPIDevice();
- if (event == "short_click" or event == "long_click") ha_button->execute(page.c_str(), component.c_str(), event.c_str());
- else if (event == "click")
- {
- if (page == "home" and component == "climate")
- {
- detailed_entity->publish_state((id(is_embedded_thermostat)) ? "embedded_climate" : "");
- disp1->set_component_value("climate.embedded", id(is_embedded_thermostat) ? 1 : 0);
- }
- disp1->goto_page("climate");
- }
- else if (page == "light" or page == "climate" or page == "notification")// Generic event
- {
- ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint",
- {
- {"type", "generic"},
- {"page", page},
- {"event", event},
- {"value", value},
- {"entity", entity}
- });
+ if (event == "short_click" or event == "long_click") {
+ ha_button->execute(page.c_str(), component.c_str(), event.c_str());
+ } else if (event == "click" and page == "home" and component == "climate") {
+ detailed_entity->publish_state((id(is_embedded_thermostat)) ? "embedded_climate" : "");
+ disp1->set_component_value("climate.embedded", id(is_embedded_thermostat) ? 1 : 0);
+ disp1->goto_page("climate");
+ } else if (page == "light" or page == "climate" or page == "notification") { // Generic event
+ ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint", {
+ {"type", "generic"},
+ {"page", page},
+ {"event", event},
+ {"value", value},
+ {"entity", entity}
+ });
}
// page based actions
@@ -1968,7 +1952,7 @@ script:
{"command", command}
});
- - id: update_alarm_icon
+ - id: update_alarm_icon #To do: Move to blueprint
mode: restart
parameters:
component: string
@@ -2224,7 +2208,8 @@ script:
// Go to boot page if not initiated
if (page != "boot" and not nextion_init->state) disp1->goto_page("boot");
// Reset globals
- if (page != "climate" &&
+ if (page != "alarm" && //DEBOG
+ page != "climate" &&
page != "cover" &&
page != "fan" &&
page != "light" &&
diff --git a/advanced/hmi/nspanel_eu.HMI b/advanced/hmi/nspanel_eu.HMI
index fd985c0..e58b87f 100644
Binary files a/advanced/hmi/nspanel_eu.HMI and b/advanced/hmi/nspanel_eu.HMI differ
diff --git a/advanced/hmi/nspanel_eu_code/Program.s.txt b/advanced/hmi/nspanel_eu_code/Program.s.txt
index 60e14a3..8828da8 100644
--- a/advanced/hmi/nspanel_eu_code/Program.s.txt
+++ b/advanced/hmi/nspanel_eu_code/Program.s.txt
@@ -6,7 +6,7 @@ Program.s
int p=0,q=0,t=0,f=0
int dimdelta=0
int api=0 // 0 = disconnected from HA, 1 = connected to HA
- int is_alarm=0,is_entities=0,is_qrcode=0,is_notification=0
+ int is_entities=0,is_qrcode=0,is_notification=0
int brightness=100,brightness_dim=40
int display_mode=1 // 1 = EU, 2 = US, 3 = US landscape
int charset=1 // 1 = International (original), 2 = CJK
diff --git a/advanced/hmi/nspanel_eu_code/home.txt b/advanced/hmi/nspanel_eu_code/home.txt
index 426d60f..9dbd03f 100644
--- a/advanced/hmi/nspanel_eu_code/home.txt
+++ b/advanced/hmi/nspanel_eu_code/home.txt
@@ -16,7 +16,6 @@ Page home
vis bt_notific,is_notification
vis bt_qrcode,is_qrcode
vis bt_entities,is_entities
- vis bt_alarm,is_alarm
if(display_mode==3)
{
vis left_bt_text,0
@@ -364,7 +363,7 @@ Text bt_entities
page entitypage01
}
-Text bt_alarm
+Text button07
Attributes
ID : 31
Scope : global
@@ -375,10 +374,21 @@ Text bt_alarm
Max. Text Size : 3
Events
+ Touch Press Event
+ click_comp.txt="button07"
+ click_timer.en=1
+
Touch Release Event
- if(api==1)
+ if(click_timer.en==1)
{
- page alarm
+ click_timer.en=0
+ lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
}
Text meridiem
diff --git a/advanced/hmi/nspanel_us.HMI b/advanced/hmi/nspanel_us.HMI
index 390754a..339d646 100644
Binary files a/advanced/hmi/nspanel_us.HMI and b/advanced/hmi/nspanel_us.HMI differ
diff --git a/advanced/hmi/nspanel_us_code/Program.s.txt b/advanced/hmi/nspanel_us_code/Program.s.txt
index a9e675d..ecccb99 100644
--- a/advanced/hmi/nspanel_us_code/Program.s.txt
+++ b/advanced/hmi/nspanel_us_code/Program.s.txt
@@ -6,7 +6,7 @@ Program.s
int p=0,q=0,t=0,f=0
int dimdelta=0
int api=0 // 0 = disconnected from HA, 1 = connected to HA
- int is_alarm=0,is_entities=0,is_qrcode=0,is_notification=0
+ int is_entities=0,is_qrcode=0,is_notification=0
int brightness=100,brightness_dim=40
int display_mode=2 // 1 = EU, 2 = US, 3 = US landscape
int charset=2 // 1 = International (original), 2 = CJK
diff --git a/advanced/hmi/nspanel_us_code/home.txt b/advanced/hmi/nspanel_us_code/home.txt
index 45768a4..bc64bd9 100644
--- a/advanced/hmi/nspanel_us_code/home.txt
+++ b/advanced/hmi/nspanel_us_code/home.txt
@@ -16,7 +16,6 @@ Page home
vis bt_notific,is_notification
vis bt_qrcode,is_qrcode
vis bt_entities,is_entities
- vis bt_alarm,is_alarm
if(display_mode==3)
{
vis left_bt_text,0
@@ -364,7 +363,7 @@ Text bt_entities
page entitypage01
}
-Text bt_alarm
+Text button07
Attributes
ID : 31
Scope : global
@@ -375,10 +374,21 @@ Text bt_alarm
Max. Text Size : 3
Events
+ Touch Press Event
+ click_comp.txt="button07"
+ click_timer.en=1
+
Touch Release Event
- if(api==1)
+ if(click_timer.en==1)
{
- page alarm
+ click_timer.en=0
+ lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
}
Text meridiem
diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml
index 06543a4..8c9f7c8 100644
--- a/nspanel_blueprint.yaml
+++ b/nspanel_blueprint.yaml
@@ -380,6 +380,7 @@ blueprint:
entity:
filter:
domain:
+ - alarm_control_panel
- binary_sensor
- input_boolean
- light
@@ -567,6 +568,7 @@ blueprint:
entity:
filter:
domain:
+ - alarm_control_panel
- automation
- button
- climate
@@ -683,26 +685,25 @@ blueprint:
*Icon which should be displayed (Default - an icon matching the entity will be set automatically)*
default: []
selector: *icon-selector
-
- ##### Alarm Control Panel - Page Alarm
- ##### PLACEHOLDER ######################################################################
- placeholder17:
- name: ' '
- description: '# ✅ ALARM CONTROL PANEL ✅'
- default: ' '
- selector: *placeholder-selector
- ##### PLACEHOLDER ######################################################################
+ ## Page Home - Custom button 07
alarm:
- name: Alarm Control Panel to control from Home page - ENTITY (Optional)
+ name: Custom button 07 - ENTITY (Optional)
description: >
- *ALARM page*
+ *HOME page*
- *If an entity is selected, the **"Alarm page"** is activated and enabled.
+ *Entity which should be switched (ONLY light | switch | cover | input_boolean | automation | button | input_button | scene | script | fan | climate | media_player)*
+
+ *Entities with supported advanced settings will open it's settings page, all other entities will execute the action or toggle when clicked.*
default: []
- selector:
- entity:
- filter:
- domain: alarm_control_panel
+ selector: *home-custom-button-entity-selector
+ home_custom_button07_icon:
+ name: Custom button 07 - ICON (Optional)
+ description: >
+ *HOME page*
+
+ *Icon which should be displayed (Default - an icon matching the entity will be set automatically)*
+ default: []
+ selector: *icon-selector
##### Climate - Page Climate #####
##### PLACEHOLDER ######################################################################
@@ -1024,17 +1025,18 @@ blueprint:
entity:
filter:
domain:
- - light
- - switch
- - input_boolean
- - cover
+ - alarm_control_panel
- automation
- button
+ - cover
+ - fan
+ - input_boolean
- input_button
+ - light
+ - media_player
- scene
- script
- - fan
- - media_player
+ - switch
left_button_name:
name: Left hardware button name - LABEL (Optional)
description: >
@@ -1186,20 +1188,21 @@ blueprint:
entity:
filter:
domain:
- - light
- - switch
- - cover
- - input_boolean
+ - alarm_control_panel
- automation
- - button
- - input_button
- - scene
- - person
- - script
- binary_sensor
- - fan
+ - button
- climate
+ - cover
+ - fan
+ - input_boolean
+ - input_button
+ - light
- media_player
+ - person
+ - scene
+ - script
+ - switch
entity01_name:
name: Button 01 name - LABEL (Optional)
description: >
@@ -3771,6 +3774,7 @@ variables:
wake_up: 'esphome.{{ nspanel_name }}_wake_up'
icon:
domain:
+ alarm_control_panel: "\uE497" #mdi:shield
automation: "\uE6A8" #mdi:robot
binary_sensor: "\uE7C0" #mdi:dip-switch
button: "\uED76" #mdi:gesture-tap-hold
@@ -5972,7 +5976,6 @@ variables:
embedded_climate: '{{ climate == thermostat_embedded }}'
indoor_temperature_sensor: !input 'indoortemp'
embedded_indoor_temperature: '{{ indoor_temperature_sensor == nspaneltemp or not (indoor_temperature_sensor is string and indoor_temperature_sensor is match "sensor.")}}'
- alarm: !input 'alarm'
enum:
color_mode: # Possible light color modes. - https://github.com/home-assistant/core/blob/dev/homeassistant/components/light/__init__.py
@@ -6462,6 +6465,12 @@ trigger:
event_data:
entity_id: !input 'home_custom_button06'
id: home_custom_buttons
+ ##### Custom button 07 - Trigger 'home_custom_buttons' #####
+ - platform: event
+ event_type: state_changed
+ event_data:
+ entity_id: !input 'alarm'
+ id: home_custom_buttons
##### Trigger - Relays - State change #################################################################################################################
@@ -6479,14 +6488,6 @@ trigger:
entity_id: '{{ relay02_entity }}'
id: relay02_state
- ##### Trigger - Alarm Control Panel - State change #################################################################################################################
- ##### Alarm - Trigger 'alarm_state' #####
- - platform: event
- event_type: state_changed
- event_data:
- entity_id: !input 'alarm'
- id: alarm_state
-
##### Trigger - Climate - State change #################################################################################################################
##### Climate - Trigger 'climate_state' #####
- platform: event
@@ -6616,27 +6617,6 @@ condition:
- home_value01_state
- home_value02_state
- home_value03_state
- #- chip01_state
- #- chip02_state
- #- chip03_state
- #- chip04_state
- #- chip05_state
- #- chip06_state
- #- chip07_state
- #- chip08_state
- #- chip09_state
- #- chip10_state
- #- home_custom_buttons
- #- relay01_state
- #- relay02_state
- #- alarm_state
- #- climate_state
- #- left_button_state
- #- right_button_state
- #- time_state
- #- outdoortemp_state
- #- indoortemp_state
- #- weather_state_change
- '{{ page.current == page.home }}'
- condition: or # Do not update component if state haven't changed (ignore attributes changed) - event based triggers
conditions:
@@ -6777,6 +6757,12 @@ action:
valid: '{{ entity_id_is_valid }}'
has_value: '{{ has_value(entity_id) if entity_id_is_valid else false }}'
state: '{{ entity_state }}'
+ state_mui: > #DEBUG
+ {{
+ entity_state
+ if entity_domain != "alarm_control_panel"
+ else ( mui.alarm[entity_state | replace("armed_", "") | replace("disarmed", "disarm")] | default(entity_state) if entity_state else None )
+ }}
state_is_number: '{{ entity_state_is_number }}'
domain: '{{ entity_domain }}'
unit_of_measurement: '{{ state_attr(entity_id, "unit_of_measurement") | default(None) if entity_id_is_valid and entity_state_is_number else None }}'
@@ -6807,6 +6793,16 @@ action:
{% elif "idle" in entity_climate_action %}{{ all_icons.thermometer }}
{% else %}{{ icon_domain }}
{% endif %}
+ {% elif entity_domain == "alarm_control_panel" %} #DEBUG
+ {% if entity_state in ["disarmed", "disarming"] %}{{ all_icons["shield-off-outline"] }}
+ {% elif entity_state == "armed_home" %}{{ all_icons["shield-home-outline"] }}
+ {% elif entity_state == "armed_away" %}{{ all_icons["shield-lock-outline"] }}
+ {% elif entity_state == "armed_night" %}{{ all_icons["shield-moon-outline"] }}
+ {% elif entity_state == "armed_vacation" %}{{ all_icons["shield-airplane-outline"] }}
+ {% elif entity_state == "armed_bypass" %}{{ all_icons["shield-half-full"] }}
+ {% elif entity_state in ["pending", "arming"] %}{{ all_icons["shield-outline"] }}
+ {% else %}{{ all_icons["shield-alert-outline"] }}
+ {% endif %}
{% else %}
{{
all_icons[entity_icon[1]] | default(icon_domain)
@@ -6826,11 +6822,20 @@ action:
{% elif "idle" in entity_climate_action %}{{ nextion.color["off"] }}
{% else %}{{ nextion.color["off"] }}
{% endif %}
+ {% elif entity_domain == "alarm_control_panel" %} #DEBUG
+ {% if entity_state == "disarmed" %}{{ nextion.color["off"] }}
+ {% elif entity_state in ["armed_home", "armed_away", "armed_night", "armed_vacation", "armed_bypass"] %}{{ nextion.color.green }}
+ {% elif entity_state in ["pending", "arming", "disarming"] %}{{ nextion.color.amber }}
+ {% elif entity_state == "triggered" %}{{ nextion.color.red }}
+ {% else %}{{ nextion.color["off"] }}
+ {% endif %}
{% else %}{{ entity_icon_color_adjusted }}
{% endif %}
rgb_color: '{{ entity_rgb_color }}'
hvac_action: '{{ entity_hvac_action }}'
climate_action: '{{ entity_climate_action }}'
+ code_format: '{{ state_attr(entity_id, "code_format") if entity_domain == "alarm_control_panel" else None }}'
+ code_arm_required: '{{ state_attr(entity_id, "code_arm_required") | default(true) if entity_domain == "alarm_control_panel" else None }}'
- alias: Main choices
choose:
@@ -6960,13 +6965,6 @@ action:
else all_icons["format-list-bulleted-square"])
}}
entities_pages_icon_color: '{{ [ bt_entities.color_rgb ] if is_number(bt_entities.color_rgb) else bt_entities.color_rgb }}'
- alarm_state: >
- {{
- states(alarm) | default("")
- if alarm is string and alarm | length > 0
- else ""
- }}
-
continue_on_error: true
- &delay-default
delay:
@@ -7322,6 +7320,9 @@ action:
- entity: !input home_custom_button06
icon: !input home_custom_button06_icon
component: button06
+ - entity: !input alarm
+ icon: !input home_custom_button07_icon
+ component: button07
- repeat:
for_each: '{{ home_page_custom_buttons }}'
sequence:
@@ -7394,7 +7395,7 @@ action:
else:
- *hide-home_page-climate_chip
- ###### Status bar ######
+ ###### Status / Chips bar ######
- &variables-home_page_status_bar
variables:
home_page_status_bar:
@@ -8272,30 +8273,37 @@ action:
- '{{ states(currentpage) != page.media_player }}' # Don't replace this by page.current as this have to be evaluated all the time
- '{{ nspanel_event.type != "page_changed" }}'
- ## PAGE ALARM ##
+ ## PAGE ALARM ## #DEBUG
- alias: Alarm settings page
conditions: '{{ nspanel_event.page == page.alarm }}'
sequence: &refresh_page_alarm
- variables:
- alarm_entity: !input alarm
+ alarm_entity_temp: >
+ {{
+ nspanel_event.entity
+ if nspanel_event is defined and nspanel_event.entity is defined
+ else (trigger.entity_id if trigger.entity_id is defined else trigger.event.data.entity_id)
+ }}
+ alarm_entity: >
+ {{
+ alarm_entity_temp
+ if alarm_entity_temp is string and alarm_entity_temp | length > 0
+ else None
+ }}
- if: '{{ alarm_entity is string and alarm_entity is match "alarm_control_panel." }}'
then:
- - variables: #https://github.com/home-assistant/core/blob/dev/homeassistant/components/alarm_control_panel/const.py
- alarm:
- state: '{{ states(alarm_entity) | default("unavailable") }}'
- friendly_name: '{{ state_attr(alarm_entity, "friendly_name") }}'
- supported_features: '{{ state_attr(alarm_entity, "supported_features") | int(0) }}'
- code_format: '{{ state_attr(alarm_entity, "code_format") }}'
- code_arm_required: '{{ state_attr(alarm_entity, "code_arm_required") | default(true) }}'
- - condition: '{{ alarm.supported_features > 0 }}'
+ - variables:
+ entity_id: '{{ alarm_entity }}'
+ - *variable_entity
+ - condition: '{{ entity.supported_features > 0 }}'
- service: '{{ nextion.command.alarm_settings }}'
data:
- page_title: '{{ alarm.friendly_name }}'
- state: '{{ alarm.state }}'
- supported_features: '{{ alarm.supported_features }}'
- code_format: '{{ alarm.code_format if alarm.code_format else "none" }}'
- code_arm_required: '{{ alarm.code_arm_required if alarm.code_arm_required else false }}'
- entity: '{{ alarm_entity }}'
+ page_title: '{{ entity.friendly_name }}'
+ state: '{{ entity.state }}'
+ supported_features: '{{ entity.supported_features }}'
+ code_format: '{{ entity.code_format if entity.code_format else "none" }}'
+ code_arm_required: '{{ entity.code_arm_required if entity.code_arm_required else false }}'
+ entity: '{{ entity.entity_id }}'
mui_alarm: '{{ dict.values(mui[language].alarm) | list }}'
continue_on_error: true
@@ -9132,7 +9140,7 @@ action:
- alias: Default
conditions:
- '{{ last_click_button.hold_select == "Default" }}'
- - '{{ entity.domain in ["climate", "cover", "light", "fan", "media_player"] }}'
+ - '{{ entity.domain in ["alarm_control_panel", "climate", "cover", "light", "fan", "media_player"] }}'
#- '{{ entity.domain != "cover" or entity.supported_features | bitwise_and(4) > 0 }}'
#- '{{ entity.domain != "fan" or entity.supported_features | bitwise_and(1) > 0 }}'
#- '{{ entity.domain != "light" or state_attr(entity.id, "supported_color_modes") | default("unknown") | string not in ["unknown", "onoff", enum.color_mode.unknown, enum.color_mode.onoff, "", none] }}'
@@ -9531,31 +9539,38 @@ action:
conditions:
- '{{ page.current == page.light }}'
- '{{ trigger.entity_id is match "light." }}'
+ - '{{ trigger.entity_id == states(detailed_entity) }}'
sequence: *refresh_page_light
- alias: 'Cover settings page'
conditions:
- '{{ page.current == page.cover }}'
- '{{ trigger.entity_id is match "cover." }}'
+ - '{{ trigger.entity_id == states(detailed_entity) }}'
sequence: *refresh_page_cover
- alias: 'Climate page'
conditions:
- '{{ page.current == page.climate }}'
- '{{ trigger.entity_id is match "climate." }}'
+ - '{{ trigger.entity_id == states(detailed_entity) }}'
sequence: *refresh_page_climate
- alias: 'Fan page'
conditions:
- '{{ page.current == page.fan }}'
- '{{ trigger.entity_id is match "fan." }}'
+ - '{{ trigger.entity_id == states(detailed_entity) }}'
sequence: *refresh_page_fan
- alias: 'Media player page'
conditions:
- '{{ page.current == page.media_player }}'
- '{{ trigger.entity_id is match "media_player." }}'
+ - '{{ trigger.entity_id == states(detailed_entity) }}'
sequence: *refresh_page_media_player
- #- alias: 'Alarm page'
- # conditions:
- # - '{{ page.current == page.alarm }}'
- # sequence: *refresh_page_alarm
+ - alias: 'Alarm page' #DEBUG
+ conditions:
+ - '{{ page.current == page.alarm }}'
+ - '{{ trigger.entity_id is match "alarm_control_panel." }}'
+ - '{{ trigger.entity_id == states(detailed_entity) }}'
+ sequence: *refresh_page_alarm
##### UPDATE ENTITY PAGES #####
- alias: 'Update entity pages'
@@ -9632,13 +9647,6 @@ action:
- *climate-update_slider
- *climate-update_buttons
- ##### Sync Alarm #####
- - alias: Alarm - Sync
- conditions:
- - condition: trigger
- id: alarm_state
- sequence: *refresh_page_alarm
-
########## TRIGGER - HOME PAGE ###########
##### HOME PAGE - Custom buttons #####
@@ -9664,32 +9672,38 @@ action:
conditions:
- '{{ page.current == page.light }}'
- '{{ trigger_entity_id is match "light." }}'
+ - '{{ trigger.entity_id == states(detailed_entity) }}'
sequence: *refresh_page_light
- alias: 'Cover settings page'
conditions:
- '{{ page.current == page.cover }}'
- '{{ trigger_entity_id is match "cover." }}'
+ - '{{ trigger.entity_id == states(detailed_entity) }}'
sequence: *refresh_page_cover
- alias: 'Climate page'
conditions:
- '{{ page.current == page.climate }}'
- '{{ trigger_entity_id is match "climate." }}'
+ - '{{ trigger.entity_id == states(detailed_entity) }}'
sequence: *refresh_page_climate
- alias: 'Fan page'
conditions:
- '{{ page.current == page.fan }}'
- '{{ trigger_entity_id is match "fan." }}'
+ - '{{ trigger.entity_id == states(detailed_entity) }}'
sequence: *refresh_page_fan
- alias: 'Media player page'
conditions:
- '{{ page.current == page.media_player }}'
- '{{ trigger_entity_id is match "media_player." }}'
+ - '{{ trigger.entity_id == states(detailed_entity) }}'
sequence: *refresh_page_media_player
- #- alias: 'Alarm page'
- # conditions:
- # - '{{ trigger_entity_id == page.alarm }}'
- # sequence: *refresh_page_alarm
-
+ - alias: 'Alarm page' #DEBUG
+ conditions:
+ - '{{ page.current == page.alarm }}'
+ - '{{ trigger.entity_id is match "alarm_control_panel." }}'
+ - '{{ trigger.entity_id == states(detailed_entity) }}'
+ sequence: *refresh_page_alarm
##### HOME PAGE - Values #####
- alias: Home page - Values
diff --git a/nspanel_eu.tft b/nspanel_eu.tft
index c88fc20..86e1a4c 100644
Binary files a/nspanel_eu.tft and b/nspanel_eu.tft differ
diff --git a/nspanel_us.tft b/nspanel_us.tft
index 0ba17ac..d5b564e 100644
Binary files a/nspanel_us.tft and b/nspanel_us.tft differ