From 682e6f617e28637ac0d318b03e7a326a7205a14c Mon Sep 17 00:00:00 2001 From: zorruno Date: Wed, 24 Jun 2026 22:19:31 +1200 Subject: [PATCH] package updates --- .ha_run.lock | 2 +- esphome/.device-builder.json | 36 +-- packages/free_power_time_actions.yaml | 71 +++--- .../master_bedroom_4_button_switches.yaml | 209 ++++++++++++++++++ 4 files changed, 274 insertions(+), 44 deletions(-) create mode 100644 packages/master_bedroom_4_button_switches.yaml diff --git a/.ha_run.lock b/.ha_run.lock index e5e0615..874e5e1 100644 --- a/.ha_run.lock +++ b/.ha_run.lock @@ -1 +1 @@ -{"pid": 71, "version": 1, "ha_version": "2026.6.4", "start_ts": 1781925486.5362422} \ No newline at end of file +{"pid": 71, "version": 1, "ha_version": "2026.6.4", "start_ts": 1782291758.7869737} \ No newline at end of file diff --git a/esphome/.device-builder.json b/esphome/.device-builder.json index 66497a4..6933cfb 100644 --- a/esphome/.device-builder.json +++ b/esphome/.device-builder.json @@ -309,20 +309,20 @@ }, "_firmware_jobs": [ { - "job_id": "18e167c90e84", + "job_id": "a9d399c75a3c", "configuration": "esp-astroclockstepper1.yaml", - "job_type": "compile", + "job_type": "upload", "status": "completed", - "created_at": "2026-06-22T10:39:50.725643+00:00", - "started_at": "2026-06-22T10:39:50.726018+00:00", - "completed_at": "2026-06-22T10:40:00.987922+00:00", + "created_at": "2026-06-23T22:39:02.997026+00:00", + "started_at": "2026-06-23T22:39:13.550158+00:00", + "completed_at": "2026-06-23T22:39:22.381405+00:00", "exit_code": 0, "error": null, - "port": "", + "port": "OTA", "new_name": "", - "depends_on": "", - "dependency_released": false, - "progress": null, + "depends_on": "62da0bea3769", + "dependency_released": true, + "progress": 100, "remote_peer": "", "remote_job_id": "", "remote_peer_label": "", @@ -334,20 +334,20 @@ "source_esphome_version": "" }, { - "job_id": "1a468db814e3", + "job_id": "62da0bea3769", "configuration": "esp-astroclockstepper1.yaml", - "job_type": "upload", + "job_type": "compile", "status": "completed", - "created_at": "2026-06-22T03:29:56.540327+00:00", - "started_at": "2026-06-22T03:30:10.489873+00:00", - "completed_at": "2026-06-22T03:30:21.965677+00:00", + "created_at": "2026-06-23T22:39:02.996971+00:00", + "started_at": "2026-06-23T22:39:02.998359+00:00", + "completed_at": "2026-06-23T22:39:13.547225+00:00", "exit_code": 0, "error": null, - "port": "OTA", + "port": "", "new_name": "", - "depends_on": "46b32677aa36", - "dependency_released": true, - "progress": 100, + "depends_on": "", + "dependency_released": false, + "progress": null, "remote_peer": "", "remote_job_id": "", "remote_peer_label": "", diff --git a/packages/free_power_time_actions.yaml b/packages/free_power_time_actions.yaml index b55ec7a..67c5a5a 100644 --- a/packages/free_power_time_actions.yaml +++ b/packages/free_power_time_actions.yaml @@ -1,7 +1,14 @@ -############################################################################### -# PACKAGE: Free Power Time Automation -############################################################################### +#:########################################################################################:# +# PACKAGE: Free Power Time Automation # +#:########################################################################################:# # VERSION: +# 1.1.0 - 2026-06-24 +# - Changed gas-to-heatpump handover so the heat pump setpoint is offset from +# the gas heater setpoint. +# - Default heat pump offset is now -5 degrees C. +# - The offset remains YAML-only and can be changed inside +# script.free_power_gas_heater_changeover. +# # 1.0.0 - 2026-05-08 # - Initial package. # - Adds editable free power start/end times. @@ -21,11 +28,11 @@ # - input_datetime initial values are used to provide defaults. # - If you later want UI changes to survive every HA restart, remove the # initial lines after the helpers have been created and set once. -############################################################################### +#:########################################################################################:# -############################################################################### -# INPUT DATETIME -############################################################################### +#:########################################################################################:# +# INPUT DATETIME # +#:########################################################################################:# input_datetime: free_power_start_time: @@ -42,9 +49,9 @@ input_datetime: initial: "00:00:00" icon: mdi:clock-end -############################################################################### -# ENABLE SWITCHES -############################################################################### +#:########################################################################################:# +# ENABLE SWITCHES # +#:########################################################################################:# input_boolean: free_power_automation_enabled: @@ -67,9 +74,9 @@ input_boolean: name: Free Power - Underhouse Dehumidifier Enable icon: mdi:air-humidifier -############################################################################### -# TEMPLATE SENSORS -############################################################################### +#:########################################################################################:# +# TEMPLATE SENSORS # +#:########################################################################################:# template: - binary_sensor: @@ -91,9 +98,9 @@ template: {{ now_mins >= start_mins or now_mins < end_mins }} {% endif %} -############################################################################### -# SCRIPTS -############################################################################### +#:########################################################################################:# +# SCRIPTS # +#:########################################################################################:# script: free_power_start_actions: @@ -219,6 +226,17 @@ script: sequence: ########################################################################### # YAML-only settings + # + # heatpump_setpoint_offset_c: + # This is added to the current gas heater setpoint. + # + # Example: + # Gas heater setpoint: 22 + # heatpump_setpoint_offset: -5 + # Heat pump setpoint: 17 + # + # To make the heat pump only 4 degrees lower, change this to -4. + # To match the gas heater setpoint exactly, change this to 0. ########################################################################### - variables: @@ -227,7 +245,7 @@ script: heatpump_climate_entity: climate.lounge gas_heater_shutdown_delay_seconds: 60 - heatpump_setpoint_offset_c: 0 + heatpump_setpoint_offset_c: -5 heatpump_setpoint: >- {{ @@ -253,19 +271,22 @@ script: {{ states(gas_heater_setpoint_entity) not in ['unknown', 'unavailable', 'none', 'None', ''] }} ########################################################################### - # Set the Panasonic heatpump to heat mode and match the gas heater setpoint, - # with the YAML-only offset applied. + # Set the Panasonic heat pump to heat mode. + # + # The target temperature is the gas heater setpoint plus the YAML-only + # offset above. With the default offset of -5, a gas heater setpoint of + # 22 degrees will set the heat pump to 17 degrees. ########################################################################### - action: climate.set_temperature target: - entity_id: climate.lounge + entity_id: "{{ heatpump_climate_entity }}" data: hvac_mode: heat temperature: "{{ heatpump_setpoint }}" ########################################################################### - # Give the heatpump time to start before turning the gas heater off. + # Give the heat pump time to start before turning the gas heater off. ########################################################################### - delay: @@ -273,11 +294,11 @@ script: - action: switch.turn_off target: - entity_id: switch.rinnai_neo_gas_heater_heater_operation + entity_id: "{{ gas_heater_operation_entity }}" -############################################################################### -# AUTOMATIONS -############################################################################### +#:########################################################################################:# +# AUTOMATIONS # +#:########################################################################################:# automation: - id: free_power_time_start_actions diff --git a/packages/master_bedroom_4_button_switches.yaml b/packages/master_bedroom_4_button_switches.yaml new file mode 100644 index 0000000..8f4daec --- /dev/null +++ b/packages/master_bedroom_4_button_switches.yaml @@ -0,0 +1,209 @@ +#:########################################################################################:# +# Master Bedroom 4 Button Scene Switches # +#:########################################################################################:# +# +# TITLE: +# Master Bedroom 4 Button Scene Switches +# +# FILE: +# master_bedroom_4_button_scene_switches.yaml +# +# VERSION: +# V1.0 2026-06-24 +# +# VERSION HISTORY: +# V1.0 2026-06-24 +# - Initial package. +# - Added West and East Moes TS004F 4-button Zigbee2MQTT scene switches. +# - Uses Zigbee2MQTT MQTT action payloads directly. +# +# PURPOSE: +# Controls Master Bedroom lighting from two Zigbee2MQTT Moes 4-button scene +# switches. +# +# NOTES: +# Zigbee2MQTT action payloads used: +# - 1_single = Top left +# - 2_single = Top right +# - 3_single = Bottom left +# - 4_single = Bottom right +# +# West switch: +# - Top left = Main Bedroom South Lights ON +# - Top right = Bedside Light ON +# - Bottom left = Main Bedroom South Lights OFF + Main Bedroom North Lights OFF +# - Bottom right = Bedside Light OFF +# +# East switch: +# - Top left = Bedside Light ON +# - Top right = Main Bedroom South Lights ON +# - Bottom left = Bedside Light OFF +# - Bottom right = Main Bedroom South Lights OFF + Main Bedroom North Lights OFF +# +#:########################################################################################:# + +#:########################################################################################:# +# AUTOMATIONS # +#:########################################################################################:# + +automation: + - id: master_bedroom_4_button_scene_switches + alias: "Master Bedroom - 4 Button Scene Switches" + description: "Controls Master Bedroom lights from East and West Moes 4-button Zigbee2MQTT scene switches." + mode: queued + max: 10 + + variables: + west_switch_mqtt_topic: "zigbee2mqtt/Master Bedroom 4 Button Switch (West)" + east_switch_mqtt_topic: "zigbee2mqtt/Master Bedroom 4 Button Switch (East)" + + bedside_light: "switch.master_bedroom_bedside_lamp_arlec_bulb_master_bedroom_bedside_lamp_arlec_bulb_jump_fade_up_down" + main_bedroom_south_lights: "switch.master_bedroom_master_bedroom_main_lights_south_relay_2_master_bedroom_south_lights" + main_bedroom_north_lights: "light.tasmo_ifan02_3793_bedrm1_1" + + triggers: + # West switch actions + - trigger: mqtt + topic: "zigbee2mqtt/Master Bedroom 4 Button Switch (West)" + value_template: "{{ value_json.action | default('') }}" + payload: "1_single" + id: west_top_left + + - trigger: mqtt + topic: "zigbee2mqtt/Master Bedroom 4 Button Switch (West)" + value_template: "{{ value_json.action | default('') }}" + payload: "2_single" + id: west_top_right + + - trigger: mqtt + topic: "zigbee2mqtt/Master Bedroom 4 Button Switch (West)" + value_template: "{{ value_json.action | default('') }}" + payload: "3_single" + id: west_bottom_left + + - trigger: mqtt + topic: "zigbee2mqtt/Master Bedroom 4 Button Switch (West)" + value_template: "{{ value_json.action | default('') }}" + payload: "4_single" + id: west_bottom_right + + # East switch actions + - trigger: mqtt + topic: "zigbee2mqtt/Master Bedroom 4 Button Switch (East)" + value_template: "{{ value_json.action | default('') }}" + payload: "1_single" + id: east_top_left + + - trigger: mqtt + topic: "zigbee2mqtt/Master Bedroom 4 Button Switch (East)" + value_template: "{{ value_json.action | default('') }}" + payload: "2_single" + id: east_top_right + + - trigger: mqtt + topic: "zigbee2mqtt/Master Bedroom 4 Button Switch (East)" + value_template: "{{ value_json.action | default('') }}" + payload: "3_single" + id: east_bottom_left + + - trigger: mqtt + topic: "zigbee2mqtt/Master Bedroom 4 Button Switch (East)" + value_template: "{{ value_json.action | default('') }}" + payload: "4_single" + id: east_bottom_right + + actions: + - choose: + #:##############################################################################:# + # West Switch # + #:##############################################################################:# + + # West top left: + # Main Bedroom South Lights ON + - conditions: + - condition: trigger + id: west_top_left + sequence: + - action: homeassistant.turn_on + target: + entity_id: "{{ main_bedroom_south_lights }}" + + # West top right: + # Bedside Light ON + - conditions: + - condition: trigger + id: west_top_right + sequence: + - action: homeassistant.turn_on + target: + entity_id: "{{ bedside_light }}" + + # West bottom left: + # Main Bedroom South Lights OFF + # Main Bedroom North Lights OFF + - conditions: + - condition: trigger + id: west_bottom_left + sequence: + - action: homeassistant.turn_off + target: + entity_id: + - "{{ main_bedroom_south_lights }}" + - "{{ main_bedroom_north_lights }}" + + # West bottom right: + # Bedside Light OFF + - conditions: + - condition: trigger + id: west_bottom_right + sequence: + - action: homeassistant.turn_off + target: + entity_id: "{{ bedside_light }}" + + #:##############################################################################:# + # East Switch # + #:##############################################################################:# + + # East top left: + # Bedside Light ON + - conditions: + - condition: trigger + id: east_top_left + sequence: + - action: homeassistant.turn_on + target: + entity_id: "{{ bedside_light }}" + + # East top right: + # Main Bedroom South Lights ON + - conditions: + - condition: trigger + id: east_top_right + sequence: + - action: homeassistant.turn_on + target: + entity_id: "{{ main_bedroom_south_lights }}" + + # East bottom left: + # Bedside Light OFF + - conditions: + - condition: trigger + id: east_bottom_left + sequence: + - action: homeassistant.turn_off + target: + entity_id: "{{ bedside_light }}" + + # East bottom right: + # Main Bedroom South Lights OFF + # Main Bedroom North Lights OFF + - conditions: + - condition: trigger + id: east_bottom_right + sequence: + - action: homeassistant.turn_off + target: + entity_id: + - "{{ main_bedroom_south_lights }}" + - "{{ main_bedroom_north_lights }}"