Yes, I was gonna do that in config files, I prefer that way, I feel to have more control.
Your code throw me the error Integration error: action - Integration ‘action’ not found
It could be an indentation error, but I’m just starting with this and I really can’t see the problem.
What if I want those values to also change based on a MQTT values?
OK, now the mistake is visible. You can’t simply drop an automation into configuration.yaml like that.
You should uncomment this line:
#automation: !include automations.yaml
For organization purposes, it’s best to store automations in a separate file.
I suggest you remove your automation, restart Home Assistant, then use the visual Automation Editor to create the automation.
When you’re in the Automation Editor, creating a new automation, switch the Editor into YAML mode, delete whatever you see displayed, then copy-paste the example into the Editor. click the Save button and it should save it without any errors.
With all due respect, it’s becoming apparent to me that you are a beginner because you are making fundamental errors while attempting to compose a basic automation. That’s why I recommend you use the Automation Editor. In visual mode, it guides you to avoid making basic errors. For example, this is an invalid entity_id
- platform: state
entity_id:
- setpoint_amministrazione
I have not seen the code for automation.set_temp_slider but I know for a fact that there’s no such service call as setpoint_amministrazione.set_value. The correct name is input_number.set_value. Once again, the Automation Editor, in visual mode, would have helped you avoid making that mistake.
I’m definitely a beginner, sorry for not have pointed that out in the beginning.
About the second error, I’ve just realized that was an old one (I’ve removed it from my post i guess just as you were posting your reply, sorry).
No problem. Just follow my instructions posted here. You want your system to store automations in a separate file (automations.yaml). When you create automations with the Automation Editor, they will be automatically stored in that file.
Use the Automation Editor in visual mode to help avoid making basic errors whe creating modifying automations.
Use the Automation Editor in YAML mode for copy-pasting examples from the forum or when you become more familiar with the correct syntax for entities, service calls, Home Assistant’s scripting, etc.
The latest example you posted still has the wrong entity_id (it should be input_number.setpoint_amministrazione). You are also still saving the automation in configuration.yaml which isn’t the best long-term strategy for organization.
I use to put everything in the configuration.yaml file at first and then, when everything works, I move the code in the different files (as I just did!).
This because sometimes I use wrong indentation or…I don’t know what else and the code works in configuration.yaml but not in the single files, so first I solve the code errors (if there are) and then I move the code.
I guess that I can start writing the code directly in separate files!
Now…if you still have a bit of patience: how can I change that value from MQTT?
That’s a time-consuming way to compose error-free automations.
If you compose your automations in the Automation Editor, it will help you avoid making errors. Any errors you do make will be reported the moment you attempt to save the file. After you have saved it, you can switch the Editor to YAML mode and see the error-free YAML that was produced (a faster, better way for you to learn correct YAML syntax).
I know, but I had problems everywhere, not only in the automation! Buuuut I think that I will use the automation editor (I didn’t know it existed before you told me ), it surely help!
I don’t see anything in Input Number’s documentation indicating that’s possible.
If the YAML configuration of your 15 Input Numbers contains a lot of duplication, you can use the YAML feature called ‘Anchors and Aliases’ to minimize duplication. Here’s an example of its use for reducing the configuration of multiple light entities: