@Jamie_Pryer wrote:
Hey all,
Home Assistant 0.103.5Im playing around with motion and timers, so that lights come on and go off.
The slider seems to work well, however i want to show in teh UI, how long until the timer is “finished” - eg. you have 1 minute until times is out and the lights go off.i cant work out how to use the timer, to populate the value from the slider when its triggered dynamically based on when the automation is triggered?
config: timer: timer_motion_kitchen: duration: '00:15:00' ##<---???????? what should this be, as i want it to be dynamic, based on the slider value used in the automation input_number: timer_kitchen_motion_slider: name: Timer Kitchen Motion Timer initial: 5 min: 5 max: 120 step: 5
############### kitchen ############### - id: kitchenlightsonmotion alias: kitchen lights on motion trigger: - entity_id: binary_sensor.motion_sensor_kitchen_motion from: 'off' platform: state to: 'on' condition: condition: state entity_id: sun.sun state: below_horizon action: service: timer.start data: entity_id: timer_motion_kitchen service: light.turn_on data: entity_id: - light.kitchen_deconz - id: kitchenlightsoffafter30minnomotion alias: kithcen lights off no motion slider trigger: platform: state entity_id: binary_sensor.motion_sensor_kitchen_motion to: 'off' for: minutes: "{{ states('input_number.timer_kitchen_motion_slider')|int }}" action: - service: light.turn_off data: entity_id: - light.kitchen_deconz
Posts: 3
Participants: 3