Chaps
I need your help. Lets be honest, I’m just not very good at YML
OK, what am I trying to achieve. I have various security cameras that trigger outside floodlights. They work perfectly when we have good weather. Introduce a heavy rain shower and they introduce a lot of false positives. I am able to configure the sensitivity of these cameras using HA
Solution. I have a counter that tracks the number of motion detections within a certain time period. If that crosses a certain thresh-hold within a certain time, it triggers an automation where I decrease the motion sensitivity of the camera. I can do this with a STATIC number, what I would like to do is use a “Template Number” to gradually reduce the sensitivity.
This is my automation to reduce the sensitivity with a FIXED NUMBER (20)
triggers:
- trigger: time_pattern
minutes: /30
conditions:
- condition: numeric_state
entity_id: counter.counter_reolink_patio_motion_detected
above: 25
actions:
- device_id: 569573b6d0276d50b0ef488f8310016c
domain: number
entity_id: 4e60c6037eb655ff299c8018a27e31d4
type: set_value
value: 20
mode: single
I have created a TEMPLATE NUMBER that reduces 10 from the current cameras motion sensitivity
number.template_number_reolink_patio_motion_sensitivity_minus_10
{{ states('number.reolink_garden_motion_sensitivity') | float(0) - 10 }}
I’d like to use that template result in my automations actions instead of manually setting it to a fixed number and I just can’t figure out how to do it (If it’s even possible)
Thanks for any help or telling me I’m doing this the wrong way
Brucey