I think you may need a “-” before desired_humidity_min and desired_humidity_max as they are a list, but you should get an error on that when you load the YAML too.
Thank you for the reply, that didnt fix the problem and get the same error
Blockquote I think you may need a “-” before desired_humidity_min and desired_humidity_max as they are a list, but you should get an error on that when you load the YAML too.
What do you mean ? No sure about your question but this code is in Setting-> Automatisations & Scenes
Blockquote it all depends on where you are storing that code.
you say “script” but then you created two sensors and an automation.
where (which specific file) did you place that code?
Does it exist a debug mode or something else to get more info about the error…?
Also does the unit of measurement (%) on sensor.desired_humidity_min change something in the interaction of the trigger or it just to display while we read the sensor graph?
If you type in the configuration without the data: {} and mode: single, save and then re-open the YAML, you’ll see the system has added them. It will also do this if you use the UI blocks to build the automation, rather than YAML.
The data: is a generic key for actions, and included as an empty dictionary even when not required, such as for a simple switch.turn_on.
The unit of measurement is for display and does not affect the automation trigger. Without any unit, you can’t even get a history graph. The device class is primarily for the icon.
I suggest looking at the Compensation - Home Assistant.
Integration to generate those sensors. It will give you a continuous curve with just a couple of those entries and clean things up a bit.
Or they can be generated mathematically. This gives the “min” humidity, except it gives 29 for temperatures above 27, which is what I think was intended anyway:
Thx guys a lot for your involvement but my humidificator is my water distillator without the top connect on a smart switch, so it’s boil water and when Running Out of Water the self cut the power.
So after distillator has been stopped the water remain hot and continue to make Steam for an hour. So with this gap between it’s give me enough room for don’t make too much humidity and have condensation on my window in the winter.
If someone need to know this approximation chart is base on the Absolute Humidity and it base on a 21°C @ 50% RH at 89.5 kPa ( Calgary, Alberta air pressure )
If you can do math, I’m sure you can. That integration just asks for matching numbers and does the brainy stuff for you. I leave the brainy stuff to people like you, and Petro that wrote Compensation.