don’t the lights publish a state on change?
With an mqtt “thing” there’s a command topic for setting the state and a state topic for receiving a state.
This is pretty close to the setup of a switch:
Bridge mqtt:broker:mqttBroker [ host="192.168.x.x", secure=false ]
{
Thing topic mqttTest "mqttTest" {
Channels:
Type switch : mqttSwitch "MQTTSwitch" [ stateTopic="MQTTSwitch/State", commandTopic="MQTTSwitch/Command" ]
}
}
Also with zigbee2mqtt there’s a setting, that will push everything to a topic, rather than needing json transformations of every item:
experimental:
output: attribute