Hay I have 2 of these they work
what I did is
created some basic rules
basically I did this
1st i created some rules
rule1
on IrReceived#Data do publish IR/REMOTE %value% endon
on IrReceived#Protocol do publish IR/Protocol %value% endon
on IrReceived#Bits do publish IR/Bits %value% endon
on IrReceived#DataLSB do publish IR/DataLSB %value% endon
on IrReceived#Repeat do publish IR/Repeat %value% endon
dont forget the rule1 1 to activate it
this will break out the codes
pressing the red button on the remote i get
Then I created the sensors to read those MQTT messages
then over the years I got smarter i think
think why can’t just send the RED command so
I created other rule
rule3
on IrReceived#Data=0X400401000E0F do publish IR/CODES RED endon
now I see the RED in the IR/CODES

now the trick in HA
then have this automation
- id: RED IR
alias: RED IR
triggers:
- entity_id: sensor.ir_codes
to: RED
trigger: state
conditions: []
actions:
- data:
entity_id: light.kitchen
action: light.toggle
- data:
payload: IR-RED
topic: IR/CODES
action: mqtt.publish
that last payload is to reset it and see what was last press also if i press the red one again the automation will retrigger.
now when I press the red bottom on the remote my kitchen lights toggle
Don’t do what the daughter did pointed the remote at the light to turn them on. and say it doesnt work LOL
my athom is under the TV as it a matural to point the remote to the TV
in the other lounge have a other one
with this rule
rule1
on IrReceived#Data=1004E4F do publish IR-2/CODES YELLOW endon
on IrReceived#Data=1000E0F do publish IR-2/CODES RED endon
on IrReceived#Data=1008E8F do publish IR-2/CODES GREEN endon
on IrReceived#Data=100CECF do publish IR-2/CODES BLUE endon
on IrReceived#Data=1002C2D do publish IR-2/CODES UP endon
on IrReceived#Data=100ACAD do publish IR-2/CODES DOWN endon
and the other dum thing i did was
Press the rec button on the remote that’s turns the jug on and when the jug has boiled it turn on the Kitchen light
now the I have a IR gas heater
so what a did was create 2 scripts
ir_turn_on_gas_heater:
sequence:
- data_template:
payload: '{"Protocol":"NEC","Bits":32,"Data":0x416649B6}'
topic: cmnd/IR-2/irsend
action: mqtt.publish
- data_template:
entity_id: input_boolean.gas_heater_dummy
action: input_boolean.turn_on
ir_turn_off_gas_heater:
sequence:
- data_template:
payload: '{"Protocol":"NEC","Bits":32,"Data":0X4166B14E}'
topic: cmnd/IR-2/irsend
action: mqtt.publish
- data_template:
entity_id: input_boolean.gas_heater_dummy
action: input_boolean.turn_off
note the single quote and the double quotes
now I create a template switch
- platform: template
switches:
gas_heater: #gas_heater_ir
unique_id: d5d8543d-05df-4498-b87f-68921c14b468
friendly_name: Gas Heater
value_template: "{% if is_state('input_boolean.gas_heater_dummy', 'on') %}on{% else %}off{% endif %}"
turn_on:
action: script.turn_on
target:
entity_id: script.ir_turn_on_gas_heater
turn_off:
action: script.turn_on
target:
entity_id: script.ir_turn_off_gas_heater
now i have switch for the gas heater that that i can turn on off
then I created a climate control for the ga heater and the climate control only come on whan the TV is on and the lounge lights are on That my safety for controling say some one is in the house.
I have also learnt that you can put a “expire_after”
- name: "Last IR"
state_topic: "tele/IR/RESULT"
value_template: "{{value_json.IrReceived.Data}}"
expire_after: 1
qos: 1
this will else reset the Sensor after 1 sec
I use the mark 1 version “why fix what is not broken”