lawrencez
(lawrence)
November 12, 2019, 9:53am
1
Is it possible to use an input number as a condition.
For example (but this does not pass validation!):
id: Turn Heater on
alias: Turn Heater on
initial_state: True
trigger:
platform: time
at: ‘04:30:00’
condition:
condition: numeric_state
entity_id: sensor.front_bedroom_temperature
below: input_number.heater_temp_set
condition: time
weekday:
mon
tue
wed
thu
fri
action:
service: switch.turn_on
entity_id:
I think you’d need to use a template instead. Maybe try:
edit: Forgot the " | int", not sure if it’s really needed though.
condition: template
value_template: "{{(states.sensor.front_bedroom_temperature.state | int) <= (states.input_number.heater_temp_set.state | int)}}"
1 Like
lawrencez
(lawrence)
November 12, 2019, 11:25am
3
Thanks, that worked a treat…
Please mark @PodPerson ’s reply as the solution.
Look at the icons at the bottom of @PodPerson ’s reply. There should be one like the picture I showed. Click on it.
lawrencez
(lawrence)
November 12, 2019, 4:19pm
7
Sorry, cant see it. I checked all the icons and cannot see anything with “solution”
Strange. That is supposed to be available to the topic creator, which is you in this case. But I’ve seen where sometimes, for whatever reason I don’t understand, it doesn’t offer that as an option when it should. Thanks for trying, though!