additional esphome devices and fixes
This commit is contained in:
@@ -56,7 +56,6 @@ automation:
|
||||
# -------------------------------------------------------------------------
|
||||
# Main temperature display
|
||||
# - Shows normal lounge temperature
|
||||
# - If heater test mode is ON, shows the test temperature instead
|
||||
# - Normalises values so we do not get duplicated °C or long float strings
|
||||
# -------------------------------------------------------------------------
|
||||
- id: hasp_temp_to_btn_text
|
||||
@@ -64,20 +63,13 @@ automation:
|
||||
mode: queued
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- sensor.lounge_environment_lounge_environment_temperature
|
||||
- switch.rinnai_neo_gas_heater_rinnai_neo_gas_heater_test_mode
|
||||
- sensor.rinnai_neo_gas_heater_rinnai_neo_gas_heater_test_mode_temp
|
||||
entity_id: sensor.lounge_environment_lounge_environment_temperature
|
||||
action:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b1.text"
|
||||
payload: >
|
||||
{% if is_state('switch.rinnai_neo_gas_heater_rinnai_neo_gas_heater_test_mode', 'on') %}
|
||||
{% set raw = states('sensor.rinnai_neo_gas_heater_rinnai_neo_gas_heater_test_mode_temp') %}
|
||||
{% else %}
|
||||
{% set raw = states('sensor.lounge_environment_lounge_environment_temperature') %}
|
||||
{% endif %}
|
||||
{% set raw = states('sensor.lounge_environment_lounge_environment_temperature') %}
|
||||
{% set cleaned = raw
|
||||
| replace('°C', '')
|
||||
| replace('° C', '')
|
||||
@@ -189,9 +181,9 @@ automation:
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Flame button appearance
|
||||
# - Operation OFF: solid light grey background, white flame
|
||||
# - Operation ON, flame OFF: solid dark background, white flame
|
||||
# - Operation ON, flame ON: solid dark background, continuous red/orange flicker
|
||||
# - 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
|
||||
# -------------------------------------------------------------------------
|
||||
- id: hasp_heat_button_state
|
||||
alias: "HASP: update heat button state (p1b6)"
|
||||
@@ -200,19 +192,15 @@ automation:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- switch.rinnai_neo_gas_heater_heater_operation
|
||||
- switch.rinnai_neo_gas_heater_rinnai_neo_gas_heater_power
|
||||
- switch.rinnai_neo_gas_heater_rinnai_neo_gas_heater_activate_flame
|
||||
action:
|
||||
- choose:
|
||||
# OFF → dark grey (same as your other inactive buttons)
|
||||
# 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: script.turn_off
|
||||
target:
|
||||
entity_id: script.hasp_heat_flame_flicker
|
||||
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text"
|
||||
@@ -221,9 +209,8 @@ automation:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text_color"
|
||||
payload: "#FFFFFF"
|
||||
payload: "#C0C0C0"
|
||||
|
||||
# solid dark grey (no gradient)
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.bg_color"
|
||||
@@ -237,19 +224,15 @@ automation:
|
||||
topic: "hasp/openhasp_1/command/p1b6.border_color"
|
||||
payload: "#2F3240"
|
||||
|
||||
# ON (not firing) → theme blue
|
||||
# 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_power
|
||||
entity_id: switch.rinnai_neo_gas_heater_rinnai_neo_gas_heater_activate_flame
|
||||
state: "off"
|
||||
sequence:
|
||||
- service: script.turn_off
|
||||
target:
|
||||
entity_id: script.hasp_heat_flame_flicker
|
||||
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text"
|
||||
@@ -260,7 +243,6 @@ automation:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text_color"
|
||||
payload: "#FFFFFF"
|
||||
|
||||
# MATCH THEME BLUE
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.bg_color"
|
||||
@@ -274,13 +256,13 @@ automation:
|
||||
topic: "hasp/openhasp_1/command/p1b6.border_color"
|
||||
payload: "#0095D9"
|
||||
|
||||
# ON + flame → blue background + flicker
|
||||
# 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_power
|
||||
entity_id: switch.rinnai_neo_gas_heater_rinnai_neo_gas_heater_activate_flame
|
||||
state: "on"
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
@@ -288,7 +270,11 @@ automation:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text"
|
||||
payload: "\uE238"
|
||||
|
||||
# keep blue background
|
||||
- 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"
|
||||
@@ -302,10 +288,6 @@ automation:
|
||||
topic: "hasp/openhasp_1/command/p1b6.border_color"
|
||||
payload: "#0095D9"
|
||||
|
||||
- service: script.turn_on
|
||||
target:
|
||||
entity_id: script.hasp_heat_flame_flicker
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Start / restart display when HA starts
|
||||
# -------------------------------------------------------------------------
|
||||
@@ -354,11 +336,7 @@ script:
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b1.text"
|
||||
payload: >
|
||||
{% if is_state('switch.rinnai_neo_gas_heater_rinnai_neo_gas_heater_test_mode', 'on') %}
|
||||
{% set raw = states('sensor.rinnai_neo_gas_heater_rinnai_neo_gas_heater_test_mode_temp') %}
|
||||
{% else %}
|
||||
{% set raw = states('sensor.lounge_environment_lounge_environment_temperature') %}
|
||||
{% endif %}
|
||||
{% set raw = states('sensor.lounge_environment_lounge_environment_temperature') %}
|
||||
{% set cleaned = raw
|
||||
| replace('°C', '')
|
||||
| replace('° C', '')
|
||||
@@ -391,6 +369,7 @@ script:
|
||||
payload: "\uE238"
|
||||
|
||||
- choose:
|
||||
# Heater Operation OFF -> dark grey button, light grey flame
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: switch.rinnai_neo_gas_heater_heater_operation
|
||||
@@ -399,7 +378,7 @@ script:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text_color"
|
||||
payload: "#FFFFFF"
|
||||
payload: "#C0C0C0"
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.bg_color"
|
||||
@@ -413,12 +392,13 @@ script:
|
||||
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_power
|
||||
entity_id: switch.rinnai_neo_gas_heater_rinnai_neo_gas_heater_activate_flame
|
||||
state: "off"
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
@@ -438,14 +418,19 @@ 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_power
|
||||
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"
|
||||
@@ -458,9 +443,6 @@ script:
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.border_color"
|
||||
payload: "#0095D9"
|
||||
- service: script.turn_on
|
||||
target:
|
||||
entity_id: script.hasp_heat_flame_flicker
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Rotate the middle information line between Setpoint and Humidity
|
||||
@@ -502,45 +484,3 @@ script:
|
||||
|
||||
- delay:
|
||||
seconds: "{{ states('input_number.hasp_setpoint_humidity_cycle_seconds') | int(10) }}"
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Continuous flame flicker while heater operation is ON and flame/power is ON
|
||||
# Only the icon colour flickers. Background stays fixed.
|
||||
# Flicker colours are red <-> orange
|
||||
# -------------------------------------------------------------------------
|
||||
hasp_heat_flame_flicker:
|
||||
alias: "HASP: heat flame flicker"
|
||||
mode: restart
|
||||
sequence:
|
||||
- repeat:
|
||||
while:
|
||||
- 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_power
|
||||
state: "on"
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text_color"
|
||||
payload: "#FF3030"
|
||||
- delay: "00:00:00.35"
|
||||
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text_color"
|
||||
payload: "#FF8C00"
|
||||
- delay: "00:00:00.20"
|
||||
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text_color"
|
||||
payload: "#FF5A36"
|
||||
- delay: "00:00:00.30"
|
||||
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "hasp/openhasp_1/command/p1b6.text_color"
|
||||
payload: "#FFA500"
|
||||
- delay: "00:00:00.18"
|
||||
|
||||
Reference in New Issue
Block a user