Hi,
I created ESPHome IR transmitter using esp32. It works fine as such, but I got interested of user defined service I saw that sends any IR signals given in variables while called from HA. For some reason the service won’t show up in HA. Any tips why?
So I copied this logic in aims to command my yamaha rxv-450. I read API guide and to my best understanding API is defined correctly like this:
# Enable Home Assistant API
api:
id: yk_kake
encryption:
key: !secret api_key
services:
- service: remote_2code
variables:
rc_code_1: int
rc_code_2: int
then:
- remote_transmitter.transmit_pioneer:
transmitter_id: yamaha_amp
rc_code_1: !lambda 'return rc_code_1;'
rc_code_2: !lambda 'return rc_code_2;'
- service: remote_1code
variables:
rc_code_1: int
then:
- remote_transmitter.transmit_pioneer:
transmitter_id: yamaha_amp
rc_code_1: !lambda 'return rc_code_1;'
I have other setup like buttons etc, which work fine and immediately pop up into ESPhome device in HA. But the above services won’t get listed anywhere. Why?
The buttons that work, later defined after the above api part:
remote_transmitter:
pin: '${tx_pin}'
carrier_duty_percent: 50%
id: yamaha_amp
button:
- name: "ON"
platform: template
on_press:
remote_transmitter.transmit_pioneer:
transmitter_id: yamaha_amp
rc_code_1: 0x7E7E
I run latest HA in container on VM in NAS, and compile and upload the firmware for ESPhome on my laptop using the latest official container. What fails here, why do the buttons get listed in HA, but the service not?