[RFXtrx switch] Need to click two time on a button have action work

Hi,

I’m working with 433 mhz
[Basic switch](https://fr.aliexpress.com/item/1pc-DC-12v-10A-relay-1CH-wireless-RF-Remote-Control-Switch-Transmitter-Receiver/32428099104.html?spm=a2g0w.search0104.3.218.4755232aSHkKPb&ws_ab_test=searchweb0_0,searchweb201602_3_10152_10151_10065_10068_10344_10342_10343_10340_10341_10084_10083_10305_10304_10615_10307_10306_10302_10313_10059_10184_10534_100031_10604_10103_10142,searchweb201603_25,ppcSwitch_4&algo_expid=0de4e804-f957-404d-902f-4334fc864d0b-30&algo_pvid=0de4e804-f957-404d-902f-4334fc864d0b&priceBeautifyAB=3)

The command wirk great, but i need to send twice action for work, for example, if the initial state is off, i need to do, ON, delay, OFF, for relai pass to on state.
I play with signal_repetition but no result.

I have the solution to make automation with delay, but it’s a little trick …

Thanks by advance.

Config :

rfxtrx:
device: /dev/ttyUSB0
debug: true

And switch Config :

  • platform: rfxtrx
    devices:
    09130038411B20015C70:
    name: Jacuzzi
    09130008C23508013270:
    name: Portail
    09130038410B20015C70:
    name: Piscine

Enable debugging for the rfxtrx switch
And check the log to verify if the signal is send twice.

Hi @Danielhiversen

Thanks for the help :wink:

You’re right the signal has been send twice :
2018-01-19 14:08:25 DEBUG (MainThread) [homeassistant.components.api] STREAM 139832780573760 FORWARDING <Event service_executed[L]: service_call_id=139833051322744-22>
2018-01-19 14:08:25 DEBUG (MainThread) [homeassistant.components.api] STREAM 139832780573744 FORWARDING <Event service_executed[L]: service_call_id=139833051322744-22>
2018-01-19 14:08:25 DEBUG (MainThread) [homeassistant.components.api] STREAM 139832780573760 WRITING data: {“event_type”: “service_executed”, “data”: {“service_call_id”: “139833051322744-22”}, “origin”: “LOCAL”, “time_fired”: “2018-01-19T13:08:25.922131+00:00”}
2018-01-19 14:08:25 DEBUG (MainThread) [homeassistant.components.api] STREAM 139832780573744 WRITING data: {“event_type”: “service_executed”, “data”: {“service_call_id”: “139833051322744-22”}, “origin”: “LOCAL”, “time_fired”: “2018-01-19T13:08:25.922131+00:00”}
2018-01-19 14:08:25 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 139831721145288: Sending {‘id’: 12, ‘type’: ‘result’, ‘success’: True, ‘result’: None}

But i don’t know why…
Signal_repetitions is 1 by default in you’re script.

Any idea of the reason of this multiple send ?

Thanks :wink: