I have recently bought some IKEA Tradfri light bulbs and some IKEA Tradfri smart plugs, which I have integrated into Home Assistant via Zigbee2mqtt and Mosquitto. The problem that I am facing is that I don’t get very useful control elements in Home Assistant. I can only control the power-on behavior for both the light bulbs and the smart plugs. That means that right now, I can only control these devices either in the Zigbee2mqtt web interface or through MQTT publishes, which is not really elegant.
Did I miss something, or is this the way that it is supposed to work? What’s the best way to get the control elements so I can see the current status and control my devices through the dashboard?
I run everything (Home Assistant, Mosquitto, Zigbee2mqtt) in Docker.
Is the MQTT integration added to your Home Assistant installation?
The MQTT integration will autodiscover the devices from Z2M and add them as entities which you can use on your dashboards.
Yes, the MQTT integration is added to Home Assistant, and the devices are being discovered, but the default entities don’t offer things like switching on, switching off, or setting brightness.
I’ve already solved my problem with the bulbs. When I add the following chunk to configuration.yaml, the bulbs work like a charm:
However, I haven’t solved the problem with the smart plugs quite yet. When I add the following to configuration.yaml, I can switch the plug on and off, but for some reason, Home Assistant is not able to determine the current state of the switch (it shows “unknown”). I can see that switching it on and off is working in the Z2M web interface.
Strange, I get all control elements by default…
I have at least 4 different trådfri bulb versions and also switches.
Using latest versions of Mosquitto and zigbee2mqtt.
What zigbee controller do you use? (but if it work inside zigbee2mqtt it should work in home assistant)
Example:
I’ve found the problem: I just updated HA from 2023.4.0 to 2023.11.1 and everything is working as expected without any additional configuration in configuration.yaml.