Hi all, an absolute noob here needing help.
I have a Broadlink RM4 which is working fine as stand-alone and it is integrated to HA and I have tried to learn the IR codes for my gas heater using the scripting instructions (adding to configuration.yaml) but I keep getting an error when I click ‘CHECK CONFIGURATION’:
Configuration invalid! Integration error: learn_gas_heater_on - Integration ‘learn_gas_heater_on’ not found.
This is my first attempt doing something useful with HA so I hope to get this working and learn from this. But I cannot do this without your help, please help. I have no where else to turn.
Hi, this is exactly what it looks like. Just had the error and copied the contents. Please let me know if it still looks wrong.
Thank you so much for helping with this.
Configure a default setup of Home Assistant (frontend, api, etc)
At first glance I would say your indentation is all shot, but it’s hard to tell because you haven’t posted in a code block. Take a look at the example on the Broadlink page, format your indents correctly and see how that goes.
Now looks like this and I get ‘CONFIGURATION VALID’:
My next question is; how do I make that part of the script run so I can test if it is working? I mean to say, it should only run while learning and once learnt, the codes should be saved and stored. Is that correct?
To be honest - these days the HA UI is so good you should just use it to capture the codes. The codes are saved just the same and it saves writing a bunch of repetitive scripts.
See the Services tab on the HA Developer Tools page:
Thanks, understood. I didn’t realise that existed. For this Broadlink, I will use that instead.
Still, I want to learn more about the scripting, gives me options. I just want to know invoke/call a script.
Scripts are called manually - from the page I screen shot above, or from within and automation started by a trigger.
Have a read of the doco and the included examples - it’s not difficult once you get started.
Read the above first - then think about running scripts (via a service call or directly) from an action in an automation.
This is an example from the Scripts page:
# Example configuration.yaml entry
automation:
trigger:
platform: state
entity_id: light.bedroom
from: "off"
to: "on"
action:
service: script.notify_pushover
data:
title: "State change"
message: "The light is on!"