I’ll try to give a clearer example: when switching on a Ikea light bulb in a room using the physical switch (so the light turns from off to on and connect to the Signed network), this gives a birth message from the bulb in mqtt (?). And than use that message to trigger a Homey flow (eg turning on mechanical ventilation). This way I don’t have to add modules behind switches or lights to sense whether the light is switched.
The birth and last will messages are not related to devices - they are related to the MQTT-Hub app itself. So when the app starts it sends a birth message to announce it is online and then if it quits (or dies) the last will message is sent. So it doesn’t do what you want.
Theoretically if the status of the bulb does change in Homey when you power it on/off from the switch (??) then you can likely detect that from an MQTT status change in the onoff or dim topic for that device. This may depend on what actually happens when you switch it on as when off at the switch the device is ‘absent’ from the network. I don’t know what status is reflected in Homey when in this state (no ikea bulbs here). This is not needed though as…
Much better … you can trigger such a flow directly on a state change within Homey - no need for MQTT-Hub at all for that (as long as the Homey state does change)
Thanks for the clarification. Unfortunately, these devices do not change state when switched, only when they are (un)reachable with a command from Homey. Not sure how to use this though, maybe by implementing some kind of polling?
Jus wondering if you guy’s experience the same issue. MQTT Light component contains brightness_scale. The default scale is 0-255 where 255 is 100% you can adjust the scale by adjusting this brightness_scale to the max value. So brightness_scale: 100 means a scale 0 - 100. now the problem, homey scale is 0.01 to 1 where 1 equals 100%. I’m not aware how to adjust the mqtt light scale so homey knows how to handle it. any clues?
I will sit back and wait, there is still enough to find out about home assistent while waiting the funny this is while playing with Home Assistent and MQTT, It really shows how good/simple homey is. Is discovery also available in the next version?