One standard phrase …
I am new to the world of smart home, I have read a lot and I have managed to do a lot of things on my own.
I have a problem at the moment, I want the recirculation pump motor to start at a certain time, for example from 05:30 to 06:30, but to run until it reaches a temperature of eg 45c and to switch off, and to start the motor again when the temperature drops below 40c .
Sorry English is not my native language, which is probably recognizable
I use a sonoff with temperature sensor and ESPHOME …
I tried everything …
last configuration is:
Thanks, I’ve been thinking about it, but I don’t know where to start
I can understand when I read the config.yaml file what it is about, but I don’t know how to make it myself, can it help a little, for the time and temperature worked …
Well, there’s no way to configure a generic thermostat via the UI at the moment.
For the generic thermostat, you’ll need at the very least:
A temperature sensor
A switch to control the heat
You seem to have both. Take a look at the examples in the docs, this might work for you:
# Put this into your configuration.yaml, then go to Configuration -
# Server Controls, Check Configuration. If there's no error, restart HA.
climate:
- platform: generic_thermostat
name: Recirculation # Maybe choose sth. more descriptive here
heater: switch.sonoff_th16_relay
target_sensor: sensor.temperature # Are you sure this is the right sensor?
# Optional:
min_temp: 30 # Minimum Temperature the Thermostat can be set to
max_temp: 50 # Max. Temp. the Termostat can be set to
Then, in the UI (Lovelace), create a new thermostat card, and select the thermostat you’ve created on the left. If all goes well, you now have a beautiful thermostat in your UI, we can automate it in the next step.
Nice!
The min/max temps can be adjusted in the config, you can also add a min_cycle_duration or a cold_tolerance if your setup requires that, see the docs for that, just add them as a key like min_temp
Set the temperature to 45°C, if that is the temperature you want to maintain.
If you want to maintain this temperature 24/7, you don’t need an automation, just turn on the Thermostat and set the temperature - that’s it!
Now for the automation, which is time-based, right?
So, create two automations (in theory, one could do it as well, but it’s not as intuitive):
The first automation will turn on the thermostat (e.g. at 05:30), the other will turn it off (e.g. at 06:30).
Turning the thermostat on/off only means that HA will keep an eye on the temperature and heat as needed (Well, just like a regular thermostat).
You’ll do that by setting a time trigger, which you’ve already done in the one you’ve pasted here, so now you’ll need to add an action, this will be a Call Service action, as the service, select climate.turn_on or climate.turn_off.
Here is an overview of all climate services (obviously stuff like set_swing_mode won’t work for you, since there’s no fan configured in your setup)
Now, you could also call climate.set_temperature after turning on the thermostat to make sure it’s at 45°C. If you don’t, it will use the latest temperature that was set (either in the UI or via an automation)
Thank you so much.
I succeeded
I may not be grateful, but I have another question, if I want to choose a time for certain days of the week, can I do it with Conditions instead of Triggers?
It’s hard to wait for changes to test something.
Anyway I learned a lot and thank you very much.
Oh, maybe that’s not available in this forum.
If it is, there should be a “Solution” button next to the posts
Anyway, you’re here to get your Home Assistant working, not to send me internet points
Have fun on your journey