various package updates
This commit is contained in:
@@ -1,15 +1,24 @@
|
||||
###############################################################################
|
||||
# PACKAGE: OpenHASP Thermostat / Gas Heater Control
|
||||
# VERSION: v1.1 (2026-06-18)
|
||||
# NODE/TOPIC ROOT: hasp/openhasp_1/
|
||||
#
|
||||
# PAGE OBJECTS USED
|
||||
# - p1b1 = main temperature display
|
||||
# - p1b2 = setpoint display
|
||||
# - p1b2 = setpoint icon/value display
|
||||
# - p1b3 = setpoint down
|
||||
# - p1b4 = setpoint up
|
||||
# - p1b5 = heater status text
|
||||
# - p1b6 = heater operation / flame button
|
||||
# - p1b7 = humidity display
|
||||
# - p1b7 = humidity icon/value display
|
||||
#
|
||||
# NOTES:
|
||||
# - The HASP flame button toggles the ESPHome Heater Operation switch.
|
||||
# - Heater Operation ON = ESPHome Mode AUTO.
|
||||
# - Heater Operation OFF = ESPHome Mode OFF.
|
||||
# - BYPASS (Remote Only) is only shown when that ESPHome mode is selected.
|
||||
# - p1b2 and p1b7 include their icons in the MQTT text payload so HA updates
|
||||
# do not overwrite the icons loaded from pages.jsonl.
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
@@ -41,6 +50,7 @@ automation:
|
||||
# Main temperature display
|
||||
# - Shows normal lounge temperature
|
||||
# - Normalises values so we do not get duplicated °C or long float strings
|
||||
# - No space is used before °C
|
||||
# -------------------------------------------------------------------------
|
||||
- id: hasp_temp_to_btn_text
|
||||
alias: "HASP: update temp (p1b1.text)"
|
||||
@@ -60,31 +70,32 @@ automation:
|
||||
| replace('C', '')
|
||||
| trim %}
|
||||
{% if cleaned not in ['unknown', 'unavailable', '', 'none', 'None'] %}
|
||||
{{ cleaned | float(0) | round(1) }} °C
|
||||
{{ cleaned | float(0) | round(1) }}°C
|
||||
{% else %}
|
||||
-- °C
|
||||
--°C
|
||||
{% endif %}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Heater status text at bottom of screen
|
||||
# - Shows OFF when ESPHome Mode is OFF
|
||||
# - Shows BYPASS only when ESPHome Mode is BYPASS (Remote Only)
|
||||
# - Otherwise mirrors the ESPHome status text, now normally Auto (...)
|
||||
# -------------------------------------------------------------------------
|
||||
- id: hasp_heater_status_to_btn_text
|
||||
alias: "HASP: update heater status (p1b5.text)"
|
||||
mode: queued
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.rinnai_neo_gas_heater_rinnai_neo_gas_heater_status_text
|
||||
entity_id:
|
||||
- sensor.rinnai_neo_gas_heater_rinnai_neo_gas_heater_status_text
|
||||
- select.rinnai_neo_gas_heater_mode
|
||||
action:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b5.text"
|
||||
payload: >
|
||||
{% set s = states('sensor.rinnai_neo_gas_heater_rinnai_neo_gas_heater_status_text') %}
|
||||
{{ s if s not in ['unknown', 'unavailable', ''] else 'HEATER --' }}
|
||||
- service: script.hasp_publish_heater_status_text
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Setpoint display on left side of centre row
|
||||
# - Strips any existing units so only one °C is shown
|
||||
# - Includes thermometer icon so HA updates do not remove it
|
||||
# -------------------------------------------------------------------------
|
||||
- id: hasp_setpoint_to_btn_text
|
||||
alias: "HASP: update setpoint (p1b2.text)"
|
||||
@@ -104,13 +115,14 @@ automation:
|
||||
| replace('C', '')
|
||||
| trim %}
|
||||
{% if cleaned not in ['unknown', 'unavailable', '', 'none', 'None'] %}
|
||||
Set: {{ cleaned | float(0) | round(1) }}°C
|
||||
{{ '\uE50F' }} {{ cleaned | float(0) | round(1) }}°C
|
||||
{% else %}
|
||||
Set: -- °C
|
||||
{{ '\uE50F' }} --°C
|
||||
{% endif %}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Humidity display on right side of centre row
|
||||
# - Includes water/drop icon so HA updates do not remove it
|
||||
# -------------------------------------------------------------------------
|
||||
- id: hasp_humidity_to_btn_text
|
||||
alias: "HASP: update humidity (p1b7.text)"
|
||||
@@ -126,9 +138,9 @@ automation:
|
||||
{% set raw = states('sensor.lounge_environment_humidity_mqtt') %}
|
||||
{% set cleaned = raw | replace('%', '') | trim %}
|
||||
{% if cleaned in ['unknown', 'unavailable', '', 'none', 'None'] %}
|
||||
Hum: Unknown
|
||||
{{ '\uE58C' }} --%
|
||||
{% else %}
|
||||
Hum: {{ cleaned }}%
|
||||
{{ '\uE58C' }} {{ cleaned }}%
|
||||
{% endif %}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
@@ -165,7 +177,9 @@ automation:
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Middle flame button
|
||||
# - Tap toggles heater operation
|
||||
# - Tap toggles Heater Operation, which maps AUTO <-> OFF in ESPHome
|
||||
# - If Mode is BYPASS (Remote Only), tapping this will turn Heater Operation ON
|
||||
# and therefore return the ESPHome controller to AUTO.
|
||||
# -------------------------------------------------------------------------
|
||||
- id: hasp_btn_heat_toggle
|
||||
alias: "HASP: p1b6 up -> heater operation toggle"
|
||||
@@ -183,9 +197,10 @@ automation:
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Flame button appearance
|
||||
# - Operation OFF: dark grey background, light grey flame
|
||||
# - Operation ON, Activate Flame OFF: theme blue background, white flame
|
||||
# - Operation ON, Activate Flame ON: theme blue background, solid red flame
|
||||
# - OFF: dark grey background, light grey flame
|
||||
# - BYPASS: dark grey background, amber flame
|
||||
# - AUTO, flame OFF: theme blue background, white flame
|
||||
# - AUTO, flame ON: theme blue background, solid red flame
|
||||
# -------------------------------------------------------------------------
|
||||
- id: hasp_heat_button_state
|
||||
alias: "HASP: update heat button state (p1b6)"
|
||||
@@ -193,102 +208,11 @@ automation:
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- select.rinnai_neo_gas_heater_mode
|
||||
- switch.rinnai_neo_gas_heater_heater_operation
|
||||
- switch.rinnai_neo_gas_heater_rinnai_neo_gas_heater_activate_flame
|
||||
action:
|
||||
- choose:
|
||||
# Heater Operation OFF -> dark grey button, light grey flame
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: switch.rinnai_neo_gas_heater_heater_operation
|
||||
state: "off"
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text"
|
||||
payload: "\uE238"
|
||||
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text_color"
|
||||
payload: "#C0C0C0"
|
||||
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.bg_color"
|
||||
payload: "#2F3240"
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.bg_grad_color"
|
||||
payload: "#2F3240"
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.border_color"
|
||||
payload: "#2F3240"
|
||||
|
||||
# Heater Operation ON, flame OFF -> blue button, white flame
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: switch.rinnai_neo_gas_heater_heater_operation
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: switch.rinnai_neo_gas_heater_rinnai_neo_gas_heater_activate_flame
|
||||
state: "off"
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text"
|
||||
payload: "\uE238"
|
||||
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text_color"
|
||||
payload: "#FFFFFF"
|
||||
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.bg_color"
|
||||
payload: "#0095D9"
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.bg_grad_color"
|
||||
payload: "#00B6FF"
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.border_color"
|
||||
payload: "#0095D9"
|
||||
|
||||
# Heater Operation ON, flame ON -> blue button, red flame
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: switch.rinnai_neo_gas_heater_heater_operation
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: switch.rinnai_neo_gas_heater_rinnai_neo_gas_heater_activate_flame
|
||||
state: "on"
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text"
|
||||
payload: "\uE238"
|
||||
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text_color"
|
||||
payload: "#FF3030"
|
||||
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.bg_color"
|
||||
payload: "#0095D9"
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.bg_grad_color"
|
||||
payload: "#00B6FF"
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.border_color"
|
||||
payload: "#0095D9"
|
||||
- service: script.hasp_apply_heat_button_state
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Start / restart display when HA starts
|
||||
@@ -342,17 +266,12 @@ script:
|
||||
| replace('C', '')
|
||||
| trim %}
|
||||
{% if cleaned not in ['unknown', 'unavailable', '', 'none', 'None'] %}
|
||||
{{ cleaned | float(0) | round(1) }} °C
|
||||
{{ cleaned | float(0) | round(1) }}°C
|
||||
{% else %}
|
||||
-- °C
|
||||
--°C
|
||||
{% endif %}
|
||||
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b5.text"
|
||||
payload: >
|
||||
{% set s = states('sensor.rinnai_neo_gas_heater_rinnai_neo_gas_heater_status_text') %}
|
||||
{{ s if s not in ['unknown', 'unavailable', ''] else 'HEATER --' }}
|
||||
- service: script.hasp_publish_heater_status_text
|
||||
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
@@ -365,9 +284,9 @@ script:
|
||||
| replace('C', '')
|
||||
| trim %}
|
||||
{% if cleaned not in ['unknown', 'unavailable', '', 'none', 'None'] %}
|
||||
Set: {{ cleaned | float(0) | round(1) }}°C
|
||||
{{ '\uE50F' }} {{ cleaned | float(0) | round(1) }}°C
|
||||
{% else %}
|
||||
Set: -- °C
|
||||
{{ '\uE50F' }} --°C
|
||||
{% endif %}
|
||||
|
||||
- service: mqtt.publish
|
||||
@@ -377,23 +296,104 @@ script:
|
||||
{% set raw = states('sensor.lounge_environment_humidity_mqtt') %}
|
||||
{% set cleaned = raw | replace('%', '') | trim %}
|
||||
{% if cleaned in ['unknown', 'unavailable', '', 'none', 'None'] %}
|
||||
Hum: Unknown
|
||||
{{ '\uE58C' }} --%
|
||||
{% else %}
|
||||
Hum: {{ cleaned }}%
|
||||
{{ '\uE58C' }} {{ cleaned }}%
|
||||
{% endif %}
|
||||
|
||||
# Push middle flame button state
|
||||
- service: script.hasp_apply_heat_button_state
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Publish heater status text to p1b5
|
||||
# Keeps OFF/BYPASS display based on ESPHome Mode, not just the operation switch.
|
||||
#
|
||||
# Display behaviour:
|
||||
# - OFF -> Off
|
||||
# - BYPASS (Remote Only) -> Bypass (Remote Only)
|
||||
# - Auto but flame OFF -> Auto (Up to Temp)
|
||||
# - Auto (Level 1) -> Auto 🔥
|
||||
# - Auto (Level 2) -> Auto 🔥🔥
|
||||
# - Auto (Level 3) -> Auto 🔥🔥🔥
|
||||
# - Auto (Level 4) -> Auto 🔥🔥🔥🔥
|
||||
#
|
||||
# The flame is the openHASP/Material icon \uE238, not an emoji.
|
||||
# -------------------------------------------------------------------------
|
||||
hasp_publish_heater_status_text:
|
||||
alias: "HASP: publish heater status text"
|
||||
mode: queued
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b5.text"
|
||||
payload: >
|
||||
{% set mode = states('select.rinnai_neo_gas_heater_mode') %}
|
||||
{% set op = states('switch.rinnai_neo_gas_heater_heater_operation') %}
|
||||
{% set flame_on = is_state('switch.rinnai_neo_gas_heater_rinnai_neo_gas_heater_activate_flame', 'on') %}
|
||||
{% set s = states('sensor.rinnai_neo_gas_heater_rinnai_neo_gas_heater_status_text') %}
|
||||
{% set flame = '\uE238' %}
|
||||
|
||||
{% if mode == 'OFF' %}
|
||||
Off
|
||||
{% elif mode == 'BYPASS (Remote Only)' %}
|
||||
Bypass (Remote Only)
|
||||
{% elif op == 'on' and not flame_on %}
|
||||
Auto
|
||||
{% elif s not in ['unknown', 'unavailable', '', 'none', 'None'] %}
|
||||
{% set matches = s | regex_findall('Level ([0-9]+)', ignorecase=True) %}
|
||||
{% set level = matches[0] | int(0) if matches | count > 0 else 0 %}
|
||||
{% if level > 0 %}
|
||||
Auto {{ flame * level }}
|
||||
{% else %}
|
||||
{{ s }}
|
||||
{% endif %}
|
||||
{% elif mode not in ['unknown', 'unavailable', '', 'none', 'None'] %}
|
||||
{{ mode }}
|
||||
{% else %}
|
||||
HEATER --
|
||||
{% endif %}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Publish middle flame button icon and colours to p1b6
|
||||
# -------------------------------------------------------------------------
|
||||
hasp_apply_heat_button_state:
|
||||
alias: "HASP: apply heat button state"
|
||||
mode: queued
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text"
|
||||
payload: "\uE238"
|
||||
|
||||
- choose:
|
||||
# Heater Operation OFF -> dark grey button, light grey flame
|
||||
# BYPASS (Remote Only) -> dark button, amber flame so it is visibly different
|
||||
# from ordinary OFF, but still looks inactive.
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: switch.rinnai_neo_gas_heater_heater_operation
|
||||
state: "off"
|
||||
entity_id: select.rinnai_neo_gas_heater_mode
|
||||
state: "BYPASS (Remote Only)"
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text_color"
|
||||
payload: "#FFB000"
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.bg_color"
|
||||
payload: "#2F3240"
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.bg_grad_color"
|
||||
payload: "#2F3240"
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.border_color"
|
||||
payload: "#2F3240"
|
||||
|
||||
# OFF -> dark grey button, light grey flame
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: select.rinnai_neo_gas_heater_mode
|
||||
state: "OFF"
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
@@ -412,7 +412,33 @@ script:
|
||||
topic: "hasp/openhasp_1/command/p1b6.border_color"
|
||||
payload: "#2F3240"
|
||||
|
||||
# Heater Operation ON, flame OFF -> blue button, white flame
|
||||
# AUTO, flame ON -> blue button, red flame
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: switch.rinnai_neo_gas_heater_heater_operation
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: switch.rinnai_neo_gas_heater_rinnai_neo_gas_heater_activate_flame
|
||||
state: "on"
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text_color"
|
||||
payload: "#FF3030"
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.bg_color"
|
||||
payload: "#0095D9"
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.bg_grad_color"
|
||||
payload: "#00B6FF"
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.border_color"
|
||||
payload: "#0095D9"
|
||||
|
||||
# AUTO, flame OFF -> blue button, white flame
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: switch.rinnai_neo_gas_heater_heater_operation
|
||||
@@ -438,31 +464,23 @@ script:
|
||||
topic: "hasp/openhasp_1/command/p1b6.border_color"
|
||||
payload: "#0095D9"
|
||||
|
||||
# Heater Operation ON, flame ON -> blue button, red flame
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: switch.rinnai_neo_gas_heater_heater_operation
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: switch.rinnai_neo_gas_heater_rinnai_neo_gas_heater_activate_flame
|
||||
state: "on"
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text_color"
|
||||
payload: "#FF3030"
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.bg_color"
|
||||
payload: "#0095D9"
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.bg_grad_color"
|
||||
payload: "#00B6FF"
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.border_color"
|
||||
payload: "#0095D9"
|
||||
default:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text_color"
|
||||
payload: "#C0C0C0"
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.bg_color"
|
||||
payload: "#2F3240"
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.bg_grad_color"
|
||||
payload: "#2F3240"
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.border_color"
|
||||
payload: "#2F3240"
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Style centre row info buttons as text panels
|
||||
|
||||
Reference in New Issue
Block a user