I have a solar panel for raise my water bath temperature, this panel have an electric resistance to increase temperature when need it
So, I already have a sonoff TH16 to control it.
Temperature sensor inside water, and the same sonoff control de electric resistance
I want to define the time to bath, and the water temperature at that time
I already know the temperature raise 0,25ºC every minute when the resistance is on…
So, I’m sure me HA can do it… but I’m not so good templating HA
my first step is take the HH.MM needed to put resistance on
actual T= 58,4ºC ; objective T=65ºC
so (65-58,4)/0,25 = 26,4 »» 00:26 (26min on)
automations.yaml
- id: '1586516921111'
alias: Update Tempo Aquecer Banho
description: ''
trigger:
- minutes: /1
platform: time_pattern
seconds: '0'
condition: []
action:
- service: input_datetime.set_datetime
data_template:
entity_id: input_datetime.tempo_aquecer_banho
time: '{% set o = states('input_number.banho_temp') %} {% set r = states('sensor.sonoff_1000cf529b_temperature')
%} {% set t = (o-r)/0.25 %} {{ t|timestamp_custom("%H:%M",True) }}'
Every minute HA will check and calculate for how long it need to be on.
AND THIS IS NOT WORKING, what’s wrong?
… after that the strategy is subtract this time to target HH:MM bath
and trigger on the resistance…
Any other ideas?
any help…
THANKS
GP