Automation to react on an rfxtrx event

Hi,

I have an rfxtrx transceiver and a lightwave mood switch.

I have added the mood switch to HA and now I want to configure automation when it is pressed.

When I press the buttons on the switch I get messages like this in the log:

2018-08-16 10:44:34 DEBUG (Thread-3) [homeassistant.components.rfxtrx] Receive RFXCOM event from (Device_id: f29ccb16 Class: LightingDevice Sub: 0, Pkt_id: 0a140000f29ccb10030050)
2018-08-16 10:44:34 DEBUG (Thread-3) [homeassistant.components.rfxtrx] Device_id: f29ccb16 device_update. Command: Mood1
2018-08-16 10:44:40 DEBUG (Thread-3) [homeassistant.components.rfxtrx] Receive RFXCOM event from (Device_id: f29ccb16 Class: LightingDevice Sub: 0, Pkt_id: 0a140001f29ccb10040060)
2018-08-16 10:44:40 DEBUG (Thread-3) [homeassistant.components.rfxtrx] Device_id: f29ccb16 device_update. Command: Mood2
2018-08-16 10:44:46 DEBUG (Thread-3) [homeassistant.components.rfxtrx] Receive RFXCOM event from (Device_id: f29ccb16 Class: LightingDevice Sub: 0, Pkt_id: 0a140002f29ccb10050050)
2018-08-16 10:44:46 DEBUG (Thread-3) [homeassistant.components.rfxtrx] Device_id: f29ccb16 device_update. Command: Mood3

How can I create automation off the back of this?

this is how I defined my doorbell which would behave in pretty much the same way as your button…

- platform: rfxtrx
  automatic_add: True
  devices:
    0716004500910560:
      name: doorbell
      data_type:
       - Sound
      fire_event: true

fire_event is the key word here

and here’s the automation bit:

- alias: Doorbell Notification
  trigger:
    - platform: event
      event_type: signal_received
      event_data:
        entity_id: sensor.doorbell_sound
1 Like

Thank you! Yes it was the “fire_event” the rfxtrx document doesn’t really document that option very well.

Then my trigger is as follows.

  alias: Mood Switch
  trigger:
  - platform: event
    event_type: button_pressed
    event_data:
      entity_id: switch.mood_switch
      state: mood2

Obviously it can also be mood1, mood3, mood4.

Hi - I have a problem with the same hardware.

Top row is working fine - shows up automatically, but the bottom row, I can’t see the entities appearing anywhere.

I had a look in the home assistant log, but there’s no records like what you’re seeing - is that log from another place in the filesystem?

Thanks

The entities don’t appear it is an rfx event

I see what you mean - the thing I’m missing is that ID you’re getting of the RFX device. Can you point me to the place I can see it when I press the button?

If you do this on your yaml it should create an entity for you.

1 Like

Interestingly stuff that used to be working for me has stopped working now - i’m not sure why yet.

Never mind false alert - I had two switch sections in my config.