Using remote from TV for something else was always what i wanted to do so i created this docker image that listens to LIRC (ie. on Raspberry Pi) and forwards the button name to MQTT where everybody connected can get this information. It has a added benefit that it distinguish between short and long press so for one button on remote you can have a two functions! Can easily be run with docker-compose.
Tested with Pi 4 on Buster and Pi 3 on Stretch with VS1883B IR receiver. In readme you will find install information.
automation.yaml
- id: ir_toggle_lamp
alias: IR toggle lamp
trigger:
- payload: short
platform: mqtt
topic: lirc/pioneer/KEY_SCROLLDOWN
action:
- data:
entity_id: light.lamp
service: light.toggle