Z2M - IKEA STYRBAR 4-button remote (non-legacy)

Hi Guys,

I’ve altered the great work of @wavs to make the Ikea Styrbar work with Z2M in non-legacy mode.
This makes use of the mqtt topic instead of state entity. Other then that, the blueprint works the same.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.
Direct link to gist

Enjoy

1 Like

I imported the blueprint, created an automation, chose “sensor.ikea_remote_action” from the entity list, added an action, but nothing is working. The automation is not being triggered.

I checked the automation Traces and noticed this error
Executed: February 14, 2023 at 8:50:37 PM
Error: UndefinedError: ‘dict object’ has no attribute 'to_state’

I tried with blueprint from wavs but that also didn’t work.

If I manually create an automation and set any action the remote will work… So I’m not sure if I’m missing something?

Here’s the yaml code from the manual automation

alias: IKEA REMOTE TEST
description: ""
trigger:
  - platform: device
    domain: mqtt
    device_id: XXXXX
    type: action
    subtype: "on"
    discovery_id: 0xXYZABC action_on
condition: []
action:
  - service: light.toggle
    data: {}
    target:
      entity_id: light.living_room_lights
mode: single

Thanks!

The blueprint from wavs needs and entity_id, mine does not, it use the mqtt topic meaning you need to use the mqtt name of the device (e.g. Living room Switch).

Thank you. I think I know why I had an issue with your blueprint.

The Import Blueprint button in your post is linked to the other post from ways?

The url linked to your button is this: My Home Assistant

If I paste the url of this post in my blueprints page it gives an error saying there’s no blueprint to add…

Edit: Ok I fixed it and your blueprint works!
I manually copied your yaml code and pasted it in the blueprints folder and used the mqtt name of the remote and it worked!

So I guess all you need to do is to fix the link the original post.

Thanks for noticing, this should be fixed now :slight_smile:

1 Like

Thanks for the blueprint!

I’m having an issue lately with controlling light groups, but I can’t tell when it started happening.

The STYRBAR doesn’t toggle or control light groups. I’ve tested the light groups manually and they are working. Individual lights in a group can be toggled through STYRBAR.

I created an automation to test light groups, and the STYRBAR was able to toggle them. So I guess the issue is related to the Blueprint.

Thanks!