NEWS
Ikea Tradfri bulbs and Lovelace
-
Hello I am very new ioBroker.
I want to use my Ikea bulbs within the Lovelace visualisation. I have a lot of experience with Home Assistant and I'm trying to replicate my frontend.
I have installed the Lovelace, Devices and Ikea adaptors. Using the Devices adaptor, I can create simple aliases using the bulb device type. Lovelace recognizes the bulb and will allow me to turn it off and on.
How do I create the hue and brightness options? I have tried mapping using the Dimmer and Hue device types within the device's adaptor, but Lovelace does not recognize the attributes. Do I need to manually change the alias to map the Tradfri bulbs correctly?
-
@Lone-Baggie
Welcome.I suppose you installed the 0.2.3 version of the lovelace adapter, right? It is still missing a lot of functionality. Try to installe lovelace from github (you can do that in admin). This should be working in the latest versions of lovelace, especially if you are already using the devices adapter.
-
Thank you for your help.
I'm running the latest distro so versions are
Lovelace is 1.0.16
tradfri 2.6.2
Manage devices 0.3.6My issue is however I set the alias of a Tradfri bulb in the manage devices I cannot get Lovelace to recognise the attributes
If I set the alias to device type light and use the light bulb state. Lovelace can switch the bulb on and off correctly and works
However, if I try any other device type Dimmer, RGB, Hue light, colour temperature, nothing works.
Do you have an example of an alias of a Tradfri bulb that the Lovelace adaptor can recognise the brightness or the colour hue ?
-
@Lone-Baggie
I do not have a tradfri bulb. I have some phillips hue bulbs connected over zigbee adapter and others. But if you are using aliases, that should not matter at all.This is an alias device of a bulb that supports color, color temperature and dimmer:
(one of color and hue+saturation would be sufficient, but I linked both, I did it manually, because devices adapter was a bit more buggy back then. Today I'd use RGBSingle, i.e. color as #rgb string. But all different variants of color should be supported by lovelace 1.0.16)The created entity looks like this (interesting are the attributes, where you can see the addtional states):
To get an entity like this, you have to use the auto-creation feture, i.e. add room & function values to the states (I do this for the device, which is propagated to all states of the device and works fine) and not create settings for the lovelace instance manually.With this entity I can create an ligth card like this:
More info presents nice controls (only if lamp is on though):
And this also works in an entity list. Pretty nice.And there is a special light card (but I do not use it anymore, I like the default stuff, but I tested if it is working):
I hope that helps you create a similar experience.
If your device looks similar to mine a debug log from the lovelace adapter could help. There should be a line about the detection. -
Still not working. Turning bulb on and off is working OK . I have the following.
Device setup
Light alias works dimmer alias fails.
This is what it looks like in the objects
This is the tradfri objects
This is lovelace configuration
Lights turn off and on Ok , but only show friendly name not state . dimmer is missing entirely
?
-
@Lone-Baggie
Why is ON_SET empty for the dimmer device? It needs to point to the state that swichtes on / off the light. The _SET always means "send a command here" and _ACTUAL means "read status from here". _ACTUAL is optional and usually is not needed to be filled (if you just have one state for an action, fill it in _SET and leave _ACTUAL empty). That might already be the issue (or not, because the state seems to exist?). (And yes, that is not really documented anywhere, is it?).Also it is not necessary to create two devices for the Bulb. The dimmer can also switch on/off the lamp (since you also fill in the same state in ON_SET/ON_ACTUAL, right?). As you can see in my screenshots I created a device that has on/off, dimmer, colortemperature, color (rgb string & hue). All in one device. The type-detector will try to use the device that maximizes the states used, i.e. the bulb will be detected as color capable and will have all the other capabilities, detected, too. So if you do not have a concrete usecase for the "light" device, I'd scap it.
Another issue could be that lovelace tries to create two entities with the same name (I think it should try for your naming scheme) and that is not possible in homeassistant and currently one of them is discarded. You might want to take a look at the debug log for this, yourself. It should state something like that (it is not a warning anymore, because entities are recreated all the time and there seem to be valid cases where duplicates are expected... not sure... might look into that again, sometime).