File tree Expand file tree Collapse file tree
src/main/java/at/sv/hue/api/hass Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -194,6 +194,14 @@ private void putStateInternal(PutCall putCall) {
194194 httpResourceProvider .postResource (getUpdateUrl (putCall ), getBody (changeState ));
195195 }
196196
197+ /**
198+ * Publishes a silent MQTT update to Zigbee2MQTT to change light attributes without turning the light on.
199+ * This bypasses the standard Map serialization to ensure the literal "state": null is preserved in the payload,
200+ * utilizing Z2M's execute_if_off functionality.
201+ *
202+ * @param putCall The scheduled state call containing the new attributes (brightness, color_temp, etc.).
203+ * @param friendlyName The specific friendly_name attribute of the target Zigbee2MQTT device.
204+ */
197205 private void publishZ2mMqttUpdate (PutCall putCall , String friendlyName ) {
198206 List <String > payloadParts = new ArrayList <>();
199207
@@ -694,6 +702,9 @@ private static final class CreateScene {
694702 Map <String , ChangeState > entities ;
695703 }
696704
705+ /**
706+ * Data Transfer Object for publishing a message via Home Assistant's native MQTT publish service.
707+ */
697708 @ Data
698709 private static final class MqttPublish {
699710 String topic ;
You can’t perform that action at this time.
0 commit comments