hi can anyone offer some help with an automation or switch i am trying to make work please
so i have an entity switch.sonoff_1000#####
this is my heating control switch ( on/off)
i have a temperature guage on my hotwater tank
that gives me numeric readings entity sensor.hwater
so i am trying to create a manual switch that turns on the heating , notifys me its on , after checking the temperature is below 50 from my sensor.hwater
it will then keep the heating on until it reaches 50, then notify me " the water is now hot " and then it should turn the sonoff back to off
it will need to read the state of the switch.sonoff as well , so if its already on , dont turn it on
Hi Robin, i got it working , but it does not turn the water heater off at 50.00 celcius,
i am not sure how i would test a script , without running it. the turn on script starts the heater , i can see that
but when temperature had reached over 52 it still hadnt run the script to turn the heater off, and stop the script running.
there doesn’t seem to be a reason to make it so complicated.
basically you need two automations - one to turn the heater switch on only if the temp is below 50. the other will turn the heater switch off at above 50 (plus a bit to allow for hysteresis).
then you want to add in a manual “switch” to start the process rolling. So use an input_boolean for that.
the only thing you haven’t clarified is what happens if the temp is above 50 and then you turn the input boolean on? I assume that when you turn on the boolean you want to wait until the temp is below 50 then turn the heater switch on. then when the temp goes above (say) 52 you thyen want the swiutch to turn off and not be able to turn back on until you tell it to turn back on by using the boolean? At least that’s how I would do it…I think)
So if that’s case:
name: Master Heater Control
- alias: turn on the heater below 50
- alias: turn off the heater above 52
- service: switch.turn_off
- service: input_boolean.turn_off
then just put the input boolean on a card in the lovelace configuration so you cvan see it and be able to easily turn it off and on and see its state
i will give this a go, and let you know .
to answer your questions ,
yes a manual switch on my front end, that will turn on my heater , if temp is below 50
if temperature is above 50 , it will not turn on , maybe tell me water is already hot .
and yes when temperature is equal to 50, turn the heater off and message me " waters hot "
Thankyou for you time and coding , i really apreciate it .
will try it and let you know how that runs for me .
ok it all works it was me thanks Robin that works really well thankyou so much.
is there a way at the front end of showing when a script is running , and how would i trigger the script
from the front end, i wanted a button i pushed and the cript would run, and tell me its running ?
I’m interested in your setup as I’m trying to achieve similar control on my HWT.
I got a Sonoff TH16 with 4 x temperature probes attached to my tank monitoring the water temperature and I’m noticing some interesting values. For example the water temperature at the top of the tank drops slower compare to bottom which cools quickly once the water is being used at tap/shower.
Curious where your gauges gets the temperature from.
There are a few ways you can make it visable from the Lovelace UI. I think I would make and binary_sensor template to check if the script is running and show this in lovelace (binary_sensors change colors in the interface where scripts do not).
My Temp probe is in the middle of my hot water tank,
as you said the top is hotter that the bottom, theres two reasons, hot water rises and the feed to your hot water tank is at the bottom so as you use the hot water , from the top of the tank cold water enters to fill the void at the bottom.
hope this helps