Not sure if this is the correct place to ask but I noticed my Denon AVR-S750H only has 1 Entity. I tried to make a Helper that would allow me to turn the Denon on/off based on other triggers but I am getting an error in the template code I put in configuration.yaml. Hope someone can point me in the right direction to learn how to do this properly.
#Denon Reciever On/Off Button Creation
1 messages · Page 1 of 1 (latest)
Here is my code:
template:
- switch:
- name: "Denon AVR Power"
unique_id: denon_avr_power_switch
turn_on:
service: media_player.turn_on
target:
entity_id: media_player.denon_avr_s750h
turn_off:
service: media_player.turn_off
target:
entity_id: media_player.denon_avr_s750h
To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.
getting an error 😡
here is the error - Invalid config for 'template' at configuration.yaml, line 15: required key 'turn_off' not provided Invalid config for 'template' at configuration.yaml, line 17: 'turn_off' is an invalid option for 'template', check: switch->0->turn_on->0->turn_off
Your indentation is probably wrong. We'll never know until you fix the formatting
what is the best editor to use inside HAOS that will make sure formatting and syntax are correct?
I'm using File Editor
Just start by following the bot message above. Nobody can help until you do that
will do. I think I got it working though. ChatGPT helped update the code to what HA uses now.