I’m trying to move the Philips Hue integration to Mosquitto as I had too much delay between receiving the Motion trigger (Hue Motion sensor) and action on this (Philips Hue spot).
This was caused by the polling interval for the Hue integration which can;t be adjusted, but a workaround would be using MQTT in between.
What I have is that a motion will create the following MQTT message:
Logger: homeassistant.helpers.condition
Source: helpers/condition.py:458
First occurred: 21:33:06 (66 occurrences)
Last logged: 21:59:53
Error during template condition: UndefinedError: 'dict object' has no attribute 'motion'
I had the same situation and I don‘t see how Node Red can speed up things, as you still need to pull the sensor‘s state from the Bridge.
Instead, I bought Zigbee stick, installed Zigbee2mqtt and moved my Hue devices (light bulbs, LED strips and motion sensors) there.
Now motion is reported almost immediately, as is switching done. Zigbee2mqtt uses the MQTT discovery feature of Home Assistant and associated devices are automatically added to Home Assistant.
By using Node-red you can adjust the poll interval (to e.g. 500 ms) which is faster then HASS.
This setup was based on multiple discussions on internet.
But still doesn’t answer my question how I can set the enitity / trigger correct in HASS.
Can I also sort this out ?
Or do I need to split the topics, so 1 for motion, 1 for temperatute and 1 for light level ?
I now combined them into \hue\sensor\hal as all info is send from the same sensor ,only different message content.