From 64631fac3091f5000bdf7847d6436f3490607173 Mon Sep 17 00:00:00 2001 From: ESPHome Device Builder Date: Sat, 25 Jul 2026 12:53:51 +1200 Subject: [PATCH] Edit esp-occupancyoffice.yaml --- esphome/esp-occupancyoffice.yaml | 99 +++----------------------------- 1 file changed, 9 insertions(+), 90 deletions(-) diff --git a/esphome/esp-occupancyoffice.yaml b/esphome/esp-occupancyoffice.yaml index e4352af..686c95f 100644 --- a/esphome/esp-occupancyoffice.yaml +++ b/esphome/esp-occupancyoffice.yaml @@ -6,6 +6,9 @@ # https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-occupancyoffice.yaml #:########################################################################################:# # VERSIONS: +# v1.2 2026-07-25 Removed MQTT light control commands. Light 2-way sync is now handled +# directly between esp-officelights and esp-officeduallights via MQTT. +# This device now only reports occupancy and environment data to HA. # v1.1 2026-04-24 Added MQTT remote timer command script triggered by mmWave occupancy or movement # v1.0 2026-02-25 Updated yaml to zorruno layout V1.1 #:########################################################################################:# @@ -33,26 +36,24 @@ # - Publishes a text occupancy state (Movement/Occupancy/Clearance) and binary sensors for: # - mmWave Occupancy or Movement (occupancy) # - mmWave Movement (motion) -# - When mmWave Occupancy or Movement turns ON, this device publishes MQTT timer commands to: -# - ${mqtt_remote_device1_command_topic} -# - ${mqtt_remote_device2_command_topic} # - BLE scanning is started/stopped based on HA API client connection (reduces BLE load when unused). +# - Light control is handled by direct MQTT 2-way sync between esp-officelights and +# esp-officeduallights. This device does not control lights. #:########################################################################################:# # OFFLINE NOTES: # a) Home Assistant OFFLINE, but Network and MQTT ONLINE # - Device continues running mmWave logic and environment sensors. -# - MQTT remote timer commands still function if MQTT is online. # - HA entities will update again when HA returns. +# - Light control is not affected (handled by esp-officelights/officeduallights directly). # b) MQTT OFFLINE (or broker unreachable) # - Device continues running locally and via HA API (if HA is reachable). -# - MQTT-based remote timer commands will not function until MQTT returns. +# - HA entities will update again when MQTT returns. # c) Entire WiFi/Network OFFLINE # - Device continues running local mmWave/environment logic, but HA/MQTT integration is unavailable. # - Accurate time is NOT needed (SNTP not needed): logic uses relative time (time since boot), # but timing resets on reboot. #:########################################################################################:# - #:########################################################################################:# # SUBSTITUTIONS: Specific device variable substitutions # If NOT using a secrets file, just replace these with the passwords etc (in quotes) @@ -66,7 +67,7 @@ substitutions: # Project Naming project_name: "HiLink.LD1125H Office Occupancy" - project_version: "v1.1" + project_version: "v1.2" # Passwords & Secrets (unfortunately you can't use substitutions inside secrets names) api_key: !secret esp-occupancyoffice_api_key @@ -83,31 +84,6 @@ substitutions: log_level: "INFO" # NONE, ERROR, WARN, INFO, DEBUG (Default), VERBOSE, VERY_VERBOSE update_interval: "60s" # general sensor update interval - # Remote light timer payloads, in seconds. - remote_timer_left_lights_payload: "10" - remote_timer_right_lights_payload: "360" - - # MQTT REMOTE Controls - mqtt_remote_device1_name: "office-dual-lights-left" - mqtt_remote_device1_command_topic: "${mqtt_command_main_topic}/${mqtt_remote_device1_name}" - mqtt_remote_device1_command1: "On" - mqtt_remote_device1_command2: "${remote_timer_left_lights_payload}" - - mqtt_remote_device2_name: "office-dual-lights-right" - mqtt_remote_device2_command_topic: "${mqtt_command_main_topic}/${mqtt_remote_device2_name}" - mqtt_remote_device2_command1: "On" - mqtt_remote_device2_command2: "${remote_timer_right_lights_payload}" - - mqtt_remote_device3_name: "office-main-lights-left" - mqtt_remote_device3_command_topic: "${mqtt_command_main_topic}/${mqtt_remote_device3_name}" - mqtt_remote_device3_command1: "On" - mqtt_remote_device3_command2: "${remote_timer_left_lights_payload}" - - mqtt_remote_device4_name: "office-main-lights-right" - mqtt_remote_device4_command_topic: "${mqtt_command_main_topic}/${mqtt_remote_device4_name}" - mqtt_remote_device4_command1: "On" - mqtt_remote_device4_command2: "${remote_timer_right_lights_payload}" - #:########################################################################################:# # PACKAGES: Included Common Packages # https://esphome.io/components/packages.html @@ -199,7 +175,7 @@ external_components: - source: type: git url: https://github.com/ssieb/custom_components - components: [ serial ] + components: [serial] #:########################################################################################:# # LOGGING @@ -498,59 +474,6 @@ text_sensor: id: ld1125h_occupancy icon: "mdi:motion-sensor" -#:########################################################################################:# -# SCRIPT -# https://esphome.io/components/script.html -#:########################################################################################:# -script: - - id: send_remote_light_on_commands - mode: restart - then: - - mqtt.publish: - topic: "${mqtt_remote_device1_command_topic}" - payload: "${mqtt_remote_device1_command1}" - qos: 0 - retain: false - - mqtt.publish: - topic: "${mqtt_remote_device2_command_topic}" - payload: "${mqtt_remote_device2_command1}" - qos: 0 - retain: false - - mqtt.publish: - topic: "${mqtt_remote_device3_command_topic}" - payload: "${mqtt_remote_device3_command1}" - qos: 0 - retain: false - - mqtt.publish: - topic: "${mqtt_remote_device4_command_topic}" - payload: "${mqtt_remote_device4_command1}" - qos: 0 - retain: false - - - id: send_remote_light_timer_commands - mode: restart - then: - - mqtt.publish: - topic: "${mqtt_remote_device1_command_topic}" - payload: "${mqtt_remote_device1_command2}" - qos: 0 - retain: false - - mqtt.publish: - topic: "${mqtt_remote_device2_command_topic}" - payload: "${mqtt_remote_device2_command2}" - qos: 0 - retain: false - - mqtt.publish: - topic: "${mqtt_remote_device3_command_topic}" - payload: "${mqtt_remote_device3_command2}" - qos: 0 - retain: false - - mqtt.publish: - topic: "${mqtt_remote_device4_command_topic}" - payload: "${mqtt_remote_device4_command2}" - qos: 0 - retain: false - #:########################################################################################:# # BINARY SENSOR # https://esphome.io/components/binary_sensor/ @@ -560,10 +483,6 @@ binary_sensor: name: "mmWave Occupancy or Movement" id: ld1125h_movocc_binary device_class: occupancy - on_press: - - script.execute: send_remote_light_on_commands - on_release: - - script.execute: send_remote_light_timer_commands - platform: template name: "mmWave Movement"