Chaps; long story short I use HA to automate my Koi Pond Waterchanges. I have one pump that emptys water, and another that fills again. 1% Pond Volume every day. I use timers to fill and empty. The timer turns the pump on, when the timer finishes it turns the pump off. SIMPLE
I would like to have automations that check the devices have not been on longer than the total time of the timer. I want the automation to follow the initial total time of the timer . . . so if I change the Timer total time, the automation follows. Rather than setting a static time in the automation.
I’ve worked out how to GET the timer total into a template sensor
state: "{{ state_attr('timer.timer_pond_61_waterchangedaily_max_empty_time', 'duration') }}"
But this gives me an output of 0:14:00
I need to covert this into seconds . . . . . but for the life of me I can’t figure out how to do it. I thought this would work but it throws an error
state: "{{ states('sensor.template_sensor_pond_timer_waterchangedaily_empty_total_time_hrs_mins') | float > 1 }}"
ValueError: Template error: float got invalid input ‘state: “0:14:00”’ when rendering template
Any help would be greatly appreciated