Homematic Keypress not working

Hello,

Im trying to get the Homematic Keypress working, afters hours of searching of the same topics i still have problems and no clue how to solve it. I bought a HMIP WRC2 device and added it into my CCU, also done the workaround with create a programm for both channels as written in Homematic - Home Assistant.

image

But when i press the button nothing happens.

is there anything in the coding I did wrong?
My code is:

alias: Wohnzimmerlicht
description: ''
trigger:
  - platform: event
    event_type: homematic.keypress
    event_data:
      name: 00019D899762D6
      channel: 1
      param: PRESS_SHORT
action:
  - service: light.toggle
    target:
      entity_id: light.wohnzimmer_licht
mode: single

Not at first glance. I would enable debug logging for pyhomematic and the homematic platform (has been mentioned here in the forum several times, don’t know from the top of my head the exact syntax). There you should at least see the events in the logs. If you don’t see the events there, the program on the CCU might have some problem.

Hello,

Thanks for the reply, I will try to get the Logs.

I got this from developer tools, does this help in any way?

Ereignis 3 ausgelöst 22:47:
{
    "event_type": "homematic.keypress",
    "data": {
        "name": "Wohnzimmer_Lichtschalter",
        "param": "PRESS_SHORT",
        "channel": 1
    },
    "origin": "LOCAL",
    "time_fired": "2021-09-21T20:47:18.556966+00:00",
    "context": {
        "id": "7f7828375c3bf246220e5bab8879f2b3",
        "parent_id": null,
        "user_id": null
    }
}

Edit:

I Also get this from Pyhomematic

2021-09-21 23:06:34 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event homematic.keypress[L]: name=Wohnzimmer_Lichtschalter, param=PRESS_SHORT, channel=1>

Well, it’s saying Wohnzimmer_Lichtschalter instead of 00019D899762D6 in the logs. Did you try replacing that in your automation?

Hello Daniel,

The code from my first post is my automation, so im not sure why the logs saying Wohnzimmer_lichtschalter instead of 00019D899762D6. In the ccu I gave the name Wohnzimmer_lichtschalter to serial 00019D899762D6. I will delete everything and Setup everything new to get a fresh start, maybe that will help.

Anyway thanks for trying to solve my problem, I will post later if the result of the logs changed after fresh setup.

No, what I meant was to change

event_data:
  name: 00019D899762D6
  channel: 1
  param: PRESS_SHORT

to

event_data:
  name: Wohnzimmer_Lichtschalter
  channel: 1
  param: PRESS_SHORT

You’re getting that name because you have resolvenames enabled, which is ok to do. You probably just have to adjust the automation.

Big Thanks!!! That was the error, now it works.