Automation Event Trigger from RFXCOM (Doorbell)

Hello,

I’m trying to trigger an automation based on a RFXCOM event, but I can’t seem to get it to work. I receive the following event in my logging:

2021-02-05 22:35:09 DEBUG (MainThread) [homeassistant.components.rfxtrx] Receive RFXCOM event: {‘packet_type’: 17, ‘sub_type’: 0, ‘type_string’: ‘AC’, ‘id_string’: ‘213fdde:1’, ‘data’: ‘0b1100020213fdde01040f70’, ‘values’: {‘Command’: ‘Group on’, ‘Rssi numeric’: 7}}

2021-02-05 22:35:09 DEBUG (MainThread) [homeassistant.components.rfxtrx.sensor] Sensor update (Device ID: 213fdde:1 Class: LightingDevice Sub: 0)

2021-02-05 22:35:09 DEBUG (MainThread) [homeassistant.components.rfxtrx.binary_sensor] Binary sensor update (Device ID: 213fdde:1 Class: LightingDevice Sub: 0)

I’ve added only the following to my automations.yaml:

- alias: Use doorbell button to trigger notifcation
  trigger:
    platform: event
    event_type: rfxtrx_event
    event_data:
      id_string: 213fdde:1
  action:
    service: notify.mobile_app_s10
    data:
      title: Test
      message: Test

When I execute the automation from Home Assistant I do receive a notification on my phone, but it fails to trigger from the event. Anyone here that can help me?

You have a binary sensor component for the device. Instead of using rfxcom event as the trigger, try the state change of the binary sensor component.

- alias: Use doorbell button to trigger notifcation
  trigger:
    - platform: state
      entity_id: binary_sensor.rfxcom_sensor
  action:
    service: notify.mobile_app_s10
    data:
      title: Test
      message: Test

Please change the entity_id to your sensor’s.

This worked like a charm! Thank you sheminasalam!

1 Like