Hi community.
Since a couple of months I’ve started with HA, I’ve work with Arduino quite a lot, basically using code around and modifying according to my needs, Until HA appears… YAML is a pain you know where…
This problem basically is trying to use helpers - input_numbers, it work since I used this variable (or whatever) in my proyect wich is a simple wemos with dht11 and ssd1306 I2C display.
As I said before I can see in my display the number that I’ve set in HA, but I could not use that number into a simple comparison to start or stop a fan, in the code you’ll see two integers (60.0 and 58.0) harcoded as maximum an minimum value, the idea is to replace those number by input_number that I set in HA
Any help will be appreciated
Here’s the code / thanks
Personally, I would use the Bang-Bang Climate component. However, you should be able to do it using the number component. The number component will create number entities in Home Assistant that you can interact with similarly to how you would with Input number helpers.
I’ve comment unit_of_measurement: %, and it apperars to be working! congrats!
Still my question about bang-bang …
Perhaps is an silly question… wich component or how to setup the gauge with min and max values?
Hi Nick
I’ve a little problem… every time the esp restart hum_max & hum_min returns to zero, how could save the last values into the esp?
As allways thank you
Also, and I’m sorry I din not mention before, I just need a maximum value and in the line
- below: !lambda 'return id(hum_min).state;'
I need to set instead hum_min, hum_max - 2 (like histeresis setting), but also I can not make it work, it is very frustrating, the info into esphome it far away to my undertandings… hate YAML jajaja
I think input_number in HA will solve this issue but as I said at the very beggining, I could’t use that value into a lambda to turn ON / OFF the relay
Please clarify… what I posted does not use hardcoded values, it sets up a number entity that can be changed from the HA frontend (In the example below, this entity should appear in HA as number.humedad_maxima_ducha). By enabling restore_value the value of the number entity should not reset back to the min_value if the ESP restarts.
If you only want to set the max and then calculate the min based on a fixed value you do not need to set up the hum_min number entity. You can modify the lambda in the on_value_range action for the below key.
What issue is it that you think an Input number helper will solve? Using an Input number helper is very similar to using the Number component, but it requires additional coding in ESPHome. Using the Number component has the additional benefit that it will show as ‘unavailable’ in HA if the ESP is not working. Since an Input number is created in HA, it doesn’t “know” whether the ESP is working.
Hello again…
As you probably noted I’m kind of stubborn jajjajaa
I come back to input number and with your help I figured out how to do it.
Here’s the result