How to configure PT-2262 Switch into HomeAssistant

Hi,

I need help about RFXTRX integration and configuration.

I explain my configuration :slight_smile:
I’ve bought a USB Rfxcom device

I’ve plugged it on my HomeAssisant
I’ve added Rfxtrx integration, setup it and choose automatic added for new devices

I push the on and off button on the remote for each switch and in the home-assistant.log I see the new device and it’s automaticly added.

But unfortunnatly I don’t understand (correctly I think also) how to set-up my HA

Please find the log
On action
2021-03-24 19:54:19 INFO (MainThread) [homeassistant.components.rfxtrx.switch] Added switch (Device ID: 150551 Class: LightingDevice Sub: 0, Event: 09130000150551016070)
2021-03-24 19:54:19 INFO (MainThread) [homeassistant.components.rfxtrx.sensor] Added sensor (Device ID: 150551 Class: LightingDevice Sub: 0, Event: 09130000150551016070)
2021-03-24 19:54:19 INFO (MainThread) [homeassistant.components.rfxtrx.binary_sensor] Added binary sensor (Device ID: 150551 Class: LightingDevice Sub: 0 Event: 09130000150551016070)
2021-03-24 19:54:19 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new switch.rfxtrx entity: switch.pt2262_150551
2021-03-24 19:54:19 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.rfxtrx entity: sensor.pt2262_150551_rssi_numeric
2021-03-24 19:54:19 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.rfxtrx entity: binary_sensor.pt2262_150551
Off Action
2021-03-24 19:55:01 DEBUG (Thread-2105) [RFXtrx] Recv: 0x09 0x13 0x00 0x02 0x15 0x05 0x54 0x01 0x5e 0x70
2021-03-24 19:55:01 INFO (MainThread) [homeassistant.components.rfxtrx.switch] Added switch (Device ID: 150554 Class: LightingDevice Sub: 0, Event: 09130002150554015e70)
2021-03-24 19:55:01 INFO (MainThread) [homeassistant.components.rfxtrx.sensor] Added sensor (Device ID: 150554 Class: LightingDevice Sub: 0, Event: 09130002150554015e70)
2021-03-24 19:55:01 INFO (MainThread) [homeassistant.components.rfxtrx.binary_sensor] Added binary sensor (Device ID: 150554 Class: LightingDevice Sub: 0 Event: 09130002150554015e70)
2021-03-24 19:55:01 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new switch.rfxtrx entity: switch.pt2262_150554
2021-03-24 19:55:01 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.rfxtrx entity: sensor.pt2262_150554_rssi_numeric
2021-03-24 19:55:01 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.rfxtrx entity: binary_sensor.pt2262_150554
2021-03-24 19:55:01 DEBUG (Thread-2105) [RFXtrx] Recv: 0x09 0x13 0x00 0x03 0x15 0x15 0x5f 0x01 0x60 0x70

Could you help me ?

I’ve try this configuration but it’s doesn’t work

rfxtrx:
  device: /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A11SEQM8-if00-port0
  debug: true
  automatic_add: true
  devices:
    150551:
      data_bits: 4
      command_on: 0x1
      command_off: 0x4

My Config
HA Core : 2021.3.4
RfxCom USB

Hi,

See the follwing post, everything is explained.
In the new version, devices are not defined in configuration.yaml.

You can also create a two scripts to send the code (on/off) and create a switch template

    - platform: template
      lights:
        bedroom_2:
          friendly_name: "Bedroom 2 Light"
          turn_on:
            - service: script.turn_on
              entity_id: script.sbedroom2_on
          turn_off:
            - service: script.turn_on
              entity_id: script.sbedroom2_off 
alias: sbedroom2_on
sequence:
  - service: rfxtrx.send
    data:
      event: 0913000B657602010070
mode: single
alias: sbedroom2_off
sequence:
  - service: rfxtrx.send
    data:
      event: 0913000B657602010071
mode: single

Thanks a lot it’s works !

Juste a little fix because de yaml have change (based on the doc)

Example configuration.yaml entry

light:

  • platform: template
    lights:
    salon_lampes:
    friendly_name: “Lampes Salon”
    turn_on:
    service: script.lampes_salon_on
    turn_off:
    service: script.lampes_salon_off