Zigbee2Mqtt - IKEA five button remote

I didn’t come across any colour changing posts. I’ll read it again.

Which is method is better, to adapt the blue print or to simply create a script?

Cheers!

A script would be better than editing the blueprint. That way you can edit it more easily in the future and use it with other automations in the future.

Here’s one of threads about a color cycling Script.

This is in the Zigbee2Mqtt web frontend:

@Whattrees I’ll add a note in the blueprint!

1 Like

@Mari143, I think you can create a script to change the colors of the bulb and assign the left and right button actions in the blueprint to activate the script.

HIi

I’m struggling a little to create a script to change the light colours using the left and right buttons. I looked into the links above for creating a script and it doesnt work for me.

Can you please help in that? I want to change the colours of the grouped lights.

Thanks!

@starbuck93 I’m not being able to import this blueprint on HA 2022.6

It says “No valid blueprint found in the topic. Blueprint syntax blocks need to be marked as YAML or no syntax.”

I’ve tried to import frenck’s one without issues just to test if I was doing something wrong :frowning:

Anyone having the same problem?

@calexandre I can also see the issue. Must be something wrong with the formatting of the blueprint yaml? I can take a look later today.

1 Like

Thank you! Will wait for a fix :slight_smile:

Same issue here - Home Assistant Core 2022.6.1

@calexandre @cgten Fixed! Turns out, the blueprint importer doesn’t like multiple “code” styled yaml blocks.

1 Like

Thank you! its working perfectly.

@starbuck93 I’m very new to HA so could be being very stupid somewhere, but the hold up and down to change brightness isn’t working. Press to increase/decrease in increments works.

I’ve ticked the box for legacy attributes and tried importing from URL and the button.

Any help would be greatly appreciated!

Stand down! The hold to adjust brightness has started working. I haven’t done anything so not sure what it was, but I’ll take it!

1 Like

Not sure if its me or what but new to HA and still learning.

Found that I was creating the actions in the blueprint, but sometimes it doesn’t work - I note that the automation has then been deleted and this in the log file.


Logger: homeassistant.components.automation
Source: components/automation/init.py:651
Integration: Automation (documentation, issues)
First occurred: 18:32:12 (16 occurrences)
Last logged: 18:58:32

  • Blueprint Controller - IKEA E1524/E1810 TRÅDFRI Wireless 5-Button Remote generated invalid automation with inputs OrderedDict([(‘integration’, ‘Zigbee2MQTT’), (‘controller_entity’, ‘sensor.office_ikea_button_1_action’), (‘helper_last_controller_event’, ‘input_text.office_button_5’), (‘action_button_left_short’, [OrderedDict([(‘type’, ‘turn_on’), (‘device_id’, ‘0c558d59db71cae6a7058ac3f3d1adab’), (‘entity_id’, ‘switch.office_scentsy_2’), (‘domain’, ‘switch’)]), OrderedDict([(‘delay’, OrderedDict([(‘hours’, 1), (‘minutes’, 0), (‘seconds’, 0), (‘milliseconds’, 0)]))]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘0c558d59db71cae6a7058ac3f3d1adab’), (‘entity_id’, ‘switch.office_scentsy_2’), (‘domain’, ‘switch’)])]), (‘action_button_center_short’, [OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘883297945022f7baded939f8ed2af6e9’), (‘entity_id’, ‘light.office_desk_light_right’), (‘domain’, ‘light’)]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘702908659d12ed12411bd5fd9ec66cdc’), (‘entity_id’, ‘light.office_desk_light_left’), (‘domain’, ‘light’)]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘2a0c9c285ce2876742665d33bfd210e0’), (‘entity_id’, ‘light.office_desk_led’), (‘domain’, ‘light’)]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘db55968418880d2ab95433766dac7dc9’), (‘entity_id’, ‘light.office_copper_light’), (‘domain’, ‘light’)]), OrderedDict([(‘type’, ‘turn_on’), (‘device_id’, ‘9c2ab8ea53aa8d8d46c820d6ab173fa5’), (‘entity_id’, ‘light.office_light’), (‘domain’, ‘light’)]), OrderedDict([(‘delay’, OrderedDict([(‘hours’, 0), (‘minutes’, 0), (‘seconds’, 30), (‘milliseconds’, 0)]))]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘9c2ab8ea53aa8d8d46c820d6ab173fa5’), (‘entity_id’, ‘light.office_light’), (‘domain’, ‘light’)])]), (‘action_button_right_short’, [OrderedDict([(‘type’, ‘toggle’), (‘device_id’, ‘bfed8bf75f86c6382f2912089106d95a’), (‘entity_id’, ‘light.office_hidden_led’), (‘domain’, ‘light’)])]), (‘action_button_up_short’, [OrderedDict([(‘type’, ‘turn_on’), (‘device_id’, ‘702908659d12ed12411bd5fd9ec66cdc’), (‘entity_id’, ‘light.office_desk_light_left’), (‘domain’, ‘light’), (‘brightness_pct’, 100)]), OrderedDict([(‘type’, ‘turn_on’), (‘device_id’, ‘883297945022f7baded939f8ed2af6e9’), (‘entity_id’, ‘light.office_desk_light_right’), (‘domain’, ‘light’), (‘brightness_pct’, 1), (‘flash’, ‘long’)]), OrderedDict([(‘device_id’, ‘’), (‘domain’, ‘’), (‘entity_id’, ‘’)])])]): Integration ‘’ not found. Got <homeassistant.components.blueprint.models.BlueprintInputs object at 0x7f768f6770>
  • Blueprint Controller - IKEA E1524/E1810 TRÅDFRI Wireless 5-Button Remote generated invalid automation with inputs OrderedDict([(‘integration’, ‘Zigbee2MQTT’), (‘helper_last_controller_event’, ‘input_text.office_button_5’), (‘controller_entity’, ‘sensor.office_ikea_button_1_action’), (‘action_button_left_short’, [OrderedDict([(‘type’, ‘turn_on’), (‘device_id’, ‘0c558d59db71cae6a7058ac3f3d1adab’), (‘entity_id’, ‘switch.office_scentsy_2’), (‘domain’, ‘switch’)]), OrderedDict([(‘delay’, OrderedDict([(‘hours’, 1), (‘minutes’, 0), (‘seconds’, 0), (‘milliseconds’, 0)]))]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘0c558d59db71cae6a7058ac3f3d1adab’), (‘entity_id’, ‘switch.office_scentsy_2’), (‘domain’, ‘switch’)])]), (‘action_button_left_long’, [OrderedDict([(‘device_id’, ‘’), (‘domain’, ‘’), (‘entity_id’, ‘’)])]), (‘action_button_center_short’, [OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘2a0c9c285ce2876742665d33bfd210e0’), (‘entity_id’, ‘light.office_desk_led’), (‘domain’, ‘light’)]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘702908659d12ed12411bd5fd9ec66cdc’), (‘entity_id’, ‘light.office_desk_light_left’), (‘domain’, ‘light’)]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘33f2374018ff59a4bfa07078f7737cce’), (‘entity_id’, ‘light.living_room_right’), (‘domain’, ‘light’)]), OrderedDict([(‘type’, ‘turn_on’), (‘device_id’, ‘9c2ab8ea53aa8d8d46c820d6ab173fa5’), (‘entity_id’, ‘light.office_light’), (‘domain’, ‘light’)]), OrderedDict([(‘delay’, OrderedDict([(‘hours’, 0), (‘minutes’, 0), (‘seconds’, 30), (‘milliseconds’, 0)]))]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘9c2ab8ea53aa8d8d46c820d6ab173fa5’), (‘entity_id’, ‘light.office_light’), (‘domain’, ‘light’)])])]): Integration ‘’ not found. Got <homeassistant.components.blueprint.models.BlueprintInputs object at 0x7f76fe5930>
  • Blueprint Controller - IKEA E1524/E1810 TRÅDFRI Wireless 5-Button Remote generated invalid automation with inputs OrderedDict([(‘integration’, ‘Zigbee2MQTT’), (‘controller_entity’, ‘sensor.office_ikea_button_1_action’), (‘helper_last_controller_event’, ‘input_text.office_button_5’), (‘action_button_left_short’, [OrderedDict([(‘type’, ‘turn_on’), (‘device_id’, ‘0c558d59db71cae6a7058ac3f3d1adab’), (‘entity_id’, ‘switch.office_scentsy_2’), (‘domain’, ‘switch’)]), OrderedDict([(‘delay’, OrderedDict([(‘hours’, 1), (‘minutes’, 0), (‘seconds’, 0), (‘milliseconds’, 0)]))]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘0c558d59db71cae6a7058ac3f3d1adab’), (‘entity_id’, ‘switch.office_scentsy_2’), (‘domain’, ‘switch’)])]), (‘action_button_center_short’, [OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘883297945022f7baded939f8ed2af6e9’), (‘entity_id’, ‘light.office_desk_light_right’), (‘domain’, ‘light’)]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘702908659d12ed12411bd5fd9ec66cdc’), (‘entity_id’, ‘light.office_desk_light_left’), (‘domain’, ‘light’)]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘2a0c9c285ce2876742665d33bfd210e0’), (‘entity_id’, ‘light.office_desk_led’), (‘domain’, ‘light’)]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘db55968418880d2ab95433766dac7dc9’), (‘entity_id’, ‘light.office_copper_light’), (‘domain’, ‘light’)]), OrderedDict([(‘type’, ‘turn_on’), (‘device_id’, ‘9c2ab8ea53aa8d8d46c820d6ab173fa5’), (‘entity_id’, ‘light.office_light’), (‘domain’, ‘light’)]), OrderedDict([(‘delay’, OrderedDict([(‘hours’, 0), (‘minutes’, 0), (‘seconds’, 30), (‘milliseconds’, 0)]))]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘9c2ab8ea53aa8d8d46c820d6ab173fa5’), (‘entity_id’, ‘light.office_light’), (‘domain’, ‘light’)])]), (‘action_button_right_short’, [OrderedDict([(‘type’, ‘toggle’), (‘device_id’, ‘bfed8bf75f86c6382f2912089106d95a’), (‘entity_id’, ‘light.office_hidden_led’), (‘domain’, ‘light’)])]), (‘action_button_up_short’, [OrderedDict([(‘type’, ‘turn_on’), (‘device_id’, ‘702908659d12ed12411bd5fd9ec66cdc’), (‘entity_id’, ‘light.office_desk_light_left’), (‘domain’, ‘light’), (‘brightness_pct’, 100)]), OrderedDict([(‘type’, ‘turn_on’), (‘device_id’, ‘883297945022f7baded939f8ed2af6e9’), (‘entity_id’, ‘light.office_desk_light_right’), (‘domain’, ‘light’), (‘brightness_pct’, 1), (‘flash’, ‘long’)]), OrderedDict([(‘device_id’, ‘’), (‘domain’, ‘’), (‘entity_id’, ‘’)])])]): Integration ‘’ not found. Got <homeassistant.components.blueprint.models.BlueprintInputs object at 0x7f769576a0>
  • Blueprint Controller - IKEA E1524/E1810 TRÅDFRI Wireless 5-Button Remote generated invalid automation with inputs OrderedDict([(‘integration’, ‘Zigbee2MQTT’), (‘helper_last_controller_event’, ‘input_text.office_button_5’), (‘controller_entity’, ‘sensor.office_ikea_button_1_action’), (‘action_button_left_short’, [OrderedDict([(‘type’, ‘turn_on’), (‘device_id’, ‘0c558d59db71cae6a7058ac3f3d1adab’), (‘entity_id’, ‘switch.office_scentsy_2’), (‘domain’, ‘switch’)]), OrderedDict([(‘delay’, OrderedDict([(‘hours’, 1), (‘minutes’, 0), (‘seconds’, 0), (‘milliseconds’, 0)]))]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘0c558d59db71cae6a7058ac3f3d1adab’), (‘entity_id’, ‘switch.office_scentsy_2’), (‘domain’, ‘switch’)])]), (‘action_button_left_long’, [OrderedDict([(‘device_id’, ‘’), (‘domain’, ‘’), (‘entity_id’, ‘’)])]), (‘action_button_center_short’, [OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘2a0c9c285ce2876742665d33bfd210e0’), (‘entity_id’, ‘light.office_desk_led’), (‘domain’, ‘light’)]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘702908659d12ed12411bd5fd9ec66cdc’), (‘entity_id’, ‘light.office_desk_light_left’), (‘domain’, ‘light’)]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘33f2374018ff59a4bfa07078f7737cce’), (‘entity_id’, ‘light.living_room_right’), (‘domain’, ‘light’)]), OrderedDict([(‘type’, ‘turn_on’), (‘device_id’, ‘9c2ab8ea53aa8d8d46c820d6ab173fa5’), (‘entity_id’, ‘light.office_light’), (‘domain’, ‘light’)]), OrderedDict([(‘delay’, OrderedDict([(‘hours’, 0), (‘minutes’, 0), (‘seconds’, 30), (‘milliseconds’, 0)]))]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘9c2ab8ea53aa8d8d46c820d6ab173fa5’), (‘entity_id’, ‘light.office_light’), (‘domain’, ‘light’)])])]): Integration ‘’ not found. Got <homeassistant.components.blueprint.models.BlueprintInputs object at 0x7f84a75330>
  • Blueprint Controller - IKEA E1524/E1810 TRÅDFRI Wireless 5-Button Remote generated invalid automation with inputs OrderedDict([(‘integration’, ‘Zigbee2MQTT’), (‘controller_entity’, ‘sensor.office_ikea_button_1_action’), (‘helper_last_controller_event’, ‘input_text.office_button_5’), (‘action_button_left_short’, [OrderedDict([(‘type’, ‘turn_on’), (‘device_id’, ‘0c558d59db71cae6a7058ac3f3d1adab’), (‘entity_id’, ‘switch.office_scentsy_2’), (‘domain’, ‘switch’)]), OrderedDict([(‘delay’, OrderedDict([(‘hours’, 1), (‘minutes’, 0), (‘seconds’, 0), (‘milliseconds’, 0)]))]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘0c558d59db71cae6a7058ac3f3d1adab’), (‘entity_id’, ‘switch.office_scentsy_2’), (‘domain’, ‘switch’)])]), (‘action_button_center_short’, [OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘883297945022f7baded939f8ed2af6e9’), (‘entity_id’, ‘light.office_desk_light_right’), (‘domain’, ‘light’)]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘702908659d12ed12411bd5fd9ec66cdc’), (‘entity_id’, ‘light.office_desk_light_left’), (‘domain’, ‘light’)]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘2a0c9c285ce2876742665d33bfd210e0’), (‘entity_id’, ‘light.office_desk_led’), (‘domain’, ‘light’)]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘db55968418880d2ab95433766dac7dc9’), (‘entity_id’, ‘light.office_copper_light’), (‘domain’, ‘light’)]), OrderedDict([(‘type’, ‘turn_on’), (‘device_id’, ‘9c2ab8ea53aa8d8d46c820d6ab173fa5’), (‘entity_id’, ‘light.office_light’), (‘domain’, ‘light’)]), OrderedDict([(‘delay’, OrderedDict([(‘hours’, 0), (‘minutes’, 0), (‘seconds’, 30), (‘milliseconds’, 0)]))]), OrderedDict([(‘type’, ‘turn_off’), (‘device_id’, ‘9c2ab8ea53aa8d8d46c820d6ab173fa5’), (‘entity_id’, ‘light.office_light’), (‘domain’, ‘light’)])]), (‘action_button_right_short’, [OrderedDict([(‘type’, ‘toggle’), (‘device_id’, ‘bfed8bf75f86c6382f2912089106d95a’), (‘entity_id’, ‘light.office_hidden_led’), (‘domain’, ‘light’)])]), (‘action_button_up_short’, [OrderedDict([(‘type’, ‘turn_on’), (‘device_id’, ‘702908659d12ed12411bd5fd9ec66cdc’), (‘entity_id’, ‘light.office_desk_light_left’), (‘domain’, ‘light’), (‘brightness_pct’, 100)]), OrderedDict([(‘type’, ‘turn_on’), (‘device_id’, ‘883297945022f7baded939f8ed2af6e9’), (‘entity_id’, ‘light.office_desk_light_right’), (‘domain’, ‘light’), (‘brightness_pct’, 1), (‘flash’, ‘long’)]), OrderedDict([(‘device_id’, ‘’), (‘domain’, ‘’), (‘entity_id’, ‘’)])])]): Integration ‘’ not found. Got <homeassistant.components.blueprint.models.BlueprintInputs object at 0x7f8df99f60>

Have I missed anything?

@digrem It looks like your automation for the short button press up “action_button_up_short” has an extra line in it that’s empty. Here’s the relevant parts of your error message:

(‘device_id’, ‘’), (‘domain’, ‘’), (‘entity_id’, ‘’) 
...
Integration ‘’ not found.

It looks like it’s the last one?
Try to delete that from your automation and see if it works then.

I imported the blueprint, activated "Home Assistant legacy entity attributes” in zigbee2mqtt, and it works great - almost. Hold is not working.
When pressing and holding brightness up, I get two traces:
First trace:


Directly after this (same timestamp), the second trace. Can’t upload a screenshot, because this is my first post.
But in the trace no condition is met, so the outermost right path is taken.

When releasing brightness up, I get two more traces with no condition met (outermost right path).

Any hint?

Edit:
zigbee2mqtt uses these two topics
A) The “new way” how mqtt messages should be sent to HA
topic: zigbee2mqtt/TRADFRI remote control 1
payload: {“action”:“brightness_up_hold”,“battery”:74,“linkquality”:21,“update”:{“state”:“idle”},“update_available”:null}

B) Home Assistant legacy entity attributes
topic: zigbee2mqtt/TRADFRI remote control 1/action
payload: up_hold

When holding and releasing brightness up, the following is sent out via mqtt:

  1. Press and hold brightness up
    A) {“action”:“brightness_up_hold”,“battery”:74,“linkquality”:21,“update”:{“state”:“idle”},“update_available”:null}
    B) up_hold
    A) {“action”:"",“battery”:74,“linkquality”:21,“update”:{“state”:“idle”},“update_available”:null}

So the action is cleared immediately for topic A (the new way how mqtt messages should be send).
Only for Topic B the payload stays correctly at “up_hold”

  1. Relase brightness_up
    A) {“action”:“brightness_up_release”,“battery”:74,“linkquality”:21,“update”:{“state”:“idle”},“update_available”:null}
    B) up_release
    A) {“action”:"",“battery”:74,“linkquality”:21,“update”:{“state”:“idle”},“update_available”:null}

So this blueprints obviously reacts to messages of kind A), where the action is immediatly cleared out.
Shouldn’t it use triggers of kind B)?

And if I have a look at the state, then this is confirmed:

So I thought this blueprint is using the “legacy entity attributes”, but it is not, right?

Because of the same reason, if e.g. for “Left button - short press” you define several actions, only the first action is executed.

I am using the Blueprint to activate scenes, which consist of 2 Zigbee lights and a Nanoleaf light. With the author’s version it only turned on the Nanoleaf light and one (!) Zigbee light.

After changing line 87 from
mode: restart
to
mode: single
it works.

I think the cause is, that the remote throws 2 actions when pressing an arrow: arrow_left_click and battery. Therefor the automation is interrupted in-between and executed another time if mode: restart is set.
The logged error would be

Stopped because of unknown reason “null”

I’m getting the error UndefinedError: 'dict object' has no attribute 'to_state' when using this blueprint with the default IKEA E1524/E1810 5 button remote. Any help for that?

Hi. I’m in the middle of migration from ZHA to Z2M.
In ZHA I was using ZHA blueprint to control led lights.
So I found this blueprint which fits perfectly all my needs.
I don’t know why but most of the time action button (power button) don’t toggle the light. Sometimes is working and sometimes (mostly) not. When I checking automation trace I see that after hitting action button no action is taken:


I’ve already activated “Home Assistant legacy entity attributes” in Z2M settings. But this unfortunately didn’t help.
Do I need to change/set anything elase?

Does anybody know where to find a similar version of this blueprint without the need for the legacy triggers & attributes?
These will be removed in the upcoming Z2M update in January 2025

1 Like