Skip to content

Commit cbc4cfa

Browse files
committed
docs: add javadoc for z2m mqtt methods to satisfy coverage check
1 parent b3a5a64 commit cbc4cfa

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/main/java/at/sv/hue/api/hass/HassApiImpl.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)