The compound can’t be used to control lights. Lights are more complex with several attribibutes/capabilities and services.
So you could add switch entity but no light dim/color.
The dim capability is used to add a slider to change input_number entities (and its state). It can’t be used for light dim as this would need special entity dependent logic.
If you are able to rename your power to the light name with suffix _power, then this sensor will be added automatically. See this post:
Another way is not possible yet.
If that’s not possible, you can only add your power sensors into one compound and keep lights separated. So you would have a power meter device for all lights. It’s not the same but perhaps a workaround.
While thinking about a solution I got the idea of adding a device setting field for lights to set a power sensor entity name manually and this will be used instead of the default _power sensor.
I will check this and add it in the next version if possible. I’give you a a feedback…
Hi,
the current app version only uses capabilityConverters for a apabilities, not for subcapabilities. I will add support for subcapabilities in the next version.
This rounds on 2 decimal places (1st x100, then round on full integer, then /100 for 2 decimals).
The capabilityConverter uses a JavaScript function to convert the capability value “state”.
The conversion will be processed for all measure_numeric capabilities (so for all your entities).
The next app version will provide the possibility to add a converter for only a specific entry (e.g. measure_numeric.consumption_cost).
For lights it’s now possible to use the duration setting in flow cards:
Add the duration in AdvancedFlow via context menu:
Some light doesn’t seem to support a duration on turning off. If that doesn’t work with your light, use “dim to 0%” with duration. This should dim and the 0% dim value should turn off the light at the end.
Customizeable power entity for lights.
You can set now your own power entity providing the energy usage for the light in device settings.
Compound device:
capabilityConverters have been possible only for capability yet. Now you can use them for subcapabilities, too.
CapabilityConverter example:
Example for capability level. This will use the converter for all measure_numeric capabilities of this compound. This example rounds the value from HA to 2 decimals.
An example for compoundConversion to convert a UTC/ISO date to your locale version:
I use the current date/time entity from HA as example:
And I try to get this localized version:
Add your datetime entity and the conversion function.
Exchange the locale (de-DE) and the timezone (Europe/Berlin) with your values.
Keep the quotation marks - outside " " and inside ' '
Added app log to device repair view.
You will need this only in rare cases. But it could be helpful to see the log if you added a faulty compound conversion that won’t work as expected. In this case the log can show you the faulty part.
Is there anyone here who would like to test the vacuum cleaner device?
Either via Github/CLI or as a test version via the store.
I tried to add the cleaner to the app but can’t test it myself.
And don’t expect too much from the vaccum device. The HA entity only has a state and some services.
New test version 0.5.17:
The vacuum state is changed from picker to sensor. It was not possible to hide the error message on attemps to change the state using the picker. So it’s a sensor now showing the (translated) state defined by HA.
For devices using an own state list I added a raw state sensor showing the original state delivered by HA.
In addition there is a error message sensor showing a message in case of state=error.
The device tile will switch like a light tile between on and off depending on the device state (if the HA entitiy supports ON/OFF feature).