IR-Emitter mit switch

Hello, I need help or a tip.
I have a Wemos D1 mini with ESPHome intigriet.
The Wemos D1 mini does IR remote.
the switch_ir_on is generated and routed to HomeKit and “SIRI” with the HASS Bridge.
If “SIRI” operates the switch, it remains ON :rage:.
I would like the switch to switch OFF automatically after 10 seconds :+1:

Many greetings Jochen


remote_transmitter:
pin:
number: GPIO01
carrier_duty_percent: 50%
switch:

  • platform: template
    name: “ir_on”
    turn_on_action:
    • remote_transmitter.transmit_samsung:
      data: 0x111107f8

I don’t know much about Siri and HomeKit. But for me it looks like a switch is a bad abstraction for the use case.

But I think you can use the on_turn_on trigger to do a turn_off:

switch:

    platform: template
    name: “ir_on”
    id:  id_ir_on
    turn_on_action:
        remote_transmitter.transmit_samsung:
        data: 0x111107f8
    on_turn_on:
       - delay: 10s
       - switch.turn_off: id_ir_on

It’s a shame the code doesn’t work :rage:
A switch-off IR pulse is sent.
The status remains unchanged in HomeKit.
Thank you for the effort
Greetings Jochen

a button in ESPHome would be of help.
a switch that works after 10 seconds
goes back to rest by itself :+1:

I am wondering why it doesn’t work. Does the state of the switch itself (in the esphome log, in HA) not change or does it only not change in HomeKit?

But well, I have never used template switches.

Hello,
the status in the HomeAssistant changes,
but in HomeKit it is unchanged :rage: