-
-
Save niro1987/f6e84c27b304f0bf3be16a8f439e8efd to your computer and use it in GitHub Desktop.
Swapped left and right
Love you, it works :)
I hope this is the last one, maybe just a quick question.
When I press the buttons rapidly the action seems to pause a while. Then I have to wait several seconds before I can continue, is there a way to improve it?
And would it be ok for you if I fork this code? I would like to try customizing the brightness steps, maybe I can learn how to help myself out instead of giving you headaches ;)
I believe the repeated button press is blocked by the remote itself. Saw that same behavior in a YouTube video by Frenck so I never gave it any thought.
Fork all you want. Make sure to change the source_url on your fork before you import it the first time.
Happy to help the community.
Hi niro1987, thanks a lot of this blueprint. I have some issues with the color temp for IKEA lights.
On/of is working, dimming is working, changing colortemps is not. The lamps are capable of switching cold to warm white. (LED1732G11)
I'm using a lightgroup to change 3 of these exact same lights.
Some error logs:
Logger: homeassistant.components.automation.woonkamer_verlichting_eettafel_remote
Source: helpers/script.py:1337
Integration: Automation (documentation, issues)
First occurred: 8:02:24 (30 occurrences)
Last logged: 8:03:33
Woonkamer Verlichting Eettafel - Remote: Choose at step 1: choice 10: Error executing script. Error for repeat at pos 1: Error rendering data template: TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
Woonkamer Verlichting Eettafel - Remote: Choose at step 1: choice 5: Error executing script. Error for call_service at pos 1: Error rendering data template: TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
Woonkamer Verlichting Eettafel - Remote: Error executing script. Error for choose at pos 1: Error rendering data template: TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
Woonkamer Verlichting Eettafel - Remote: Choose at step 1: choice 4: Error executing script. Error for call_service at pos 1: Error rendering data template: TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
Woonkamer Verlichting Eettafel - Remote: Error executing script. Error for choose at pos 1: Error rendering data template: TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
Logger: homeassistant.components.automation.woonkamer_verlichting_eettafel_remote
Source: components/automation/__init__.py:508
Integration: Automation (documentation, issues)
First occurred: 8:02:24 (14 occurrences)
Last logged: 8:03:33
Error while executing automation automation.woonkamer_verlichting_eettafel_remote: Error rendering data template: TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
Error while executing automation automation.woonkamer_verlichting_eettafel_remote: Error rendering data template: TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
Any idea how to fix this?
Hi @FlexxFR,
The error says that the selected light entity does not have a color_temp
property while the action was performed. This could be caused by one or all of the following:
- When creating the automation, you selected the light by area or by device. For this blueprint to work you need to select it by entity.
- The light entity was turned off when you pressed one of the temperature buttons. For the temperature change to work, the light has to be on.
- The light entity does not have a
color_temp
property. Some lights that can change between warm-white and cold-white use thekelvin
property.
I used the entity selection but used a "light group", switching to 3 induvidual light entities did the trick.
Now it's working 👍
Although, HA is reproting the lightgroup is supporting the color_temp.
min_mireds: 250
max_mireds: 454
effect_list: stop_effect, okay, breathe, finish_effect, channel_change, blink
supported_color_modes: **color_temp**
entity_id: light.eettafel_lamp_1, light.eettafel_lamp_2, light.eettafel_lamp_3
friendly_name: Verlichting Eettafel
icon: mdi:lightbulb-group
supported_features: 44
Is it correct groups are not supported?
At first I still believed it was not working because I was expecting a "step-mode" like the original IKEA mode, but it's working more gradually by holding the buttons. Great, even better :)
Great to hear that you've got it working now!
By the looks of it, the light group does allow a color_temp
to be set but it does not actually report what it's current color_temp
value is.
Hey Niro, I now had the Time to fork it, but somehow it doesn't seem to work.. I already deleted it, as I thought my edits were the issue, now I have a fresh fork but it still doesn't work properly.
I get the error "Error rendering data template: TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'"
Happenes for the light color (color temp).
Do you have any idea?
The fork is here:
https://gist.github.com/dbara/911b76bb842bf2c76362c0ac9abb443b
Hey again, I found the issue and how to fix it. When you select one entity, it adds it differently than when you add multiple. You have to edit the automation as yaml and correct it.
Wrong:
light_entity:
entity_id: light.0xbc...
Correct:
light_entity:
entity_id:
- light.0xbc...
Have a good day
Hola de nuevo, encontré el problema y cómo solucionarlo. Cuando selecciona una entidad, la agrega de manera diferente que cuando agrega varias. Tienes que editar la automatización como yaml y corregirla.
Incorrecto: light_entity: entity_id: light.0xbc ...
Correcto: light_entity: entity_id: - light.0xbc ...
Que tenga un buen día
Thanks! I had the same problem with the Ikea bulbs and solved it with your tip
replace every var_light_entities.entity_id[0]
with var_light_entities.entity_id
Okay, can someone help me out here? I got the same issue with the colors. The Tradfri bulb has the property of "color_temp" but it won't change the color, always gives the same error:
Logger: homeassistant.components.automation.zigbee2mqtt_ikea_tradfri_5_button_remote_warm_white_lights
Source: components/automation/__init__.py:676
Integration: Automation ([documentation](https://www.home-assistant.io/integrations/automation), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+automation%22))
First occurred: 17:48:25 (57 occurrences)
Last logged: 19:48:19
Error while executing automation automation.zigbee2mqtt_ikea_tradfri_5_button_remote_warm_white_lights: Error rendering data template: TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
Error while executing automation automation.zigbee2mqtt_ikea_tradfri_5_button_remote_warm_white_lights: Error rendering data template: TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
I already repaired the bulb twice, no change. I can change the color using the dev menu or my own automatisation just fine.
*re-paired..
Tried it now with two bulbs simultaneously, works like a charm.
Only issue still left & right arrow seem to be swapped.
Cheers and thanks a lot already