Hi y’all,
I have this code:
sensor:
- platform: seeed_mr24hpc1
custom_spatial_static_value:
name: "Existence Energy"
id: eval
on_value:
if:
condition:
sensor.in_range:
id: eval
above: 20.0
then:
- script.execute: toggle_a0_with_cooldown
custom_spatial_motion_value:
name: "Motion Energy"
id: mval
I’m trying to execute the script, “toggle_a0_with_cooldown”, when either Existence energy (id: eval) is above 20 or Motion energy (id: mval) is above 5. I’m not sure how to type the syntax for this. Here’s my attempt :
sensor:
- platform: seeed_mr24hpc1
custom_spatial_static_value:
name: "Existence Energy"
id: eval
on_value:
if:
condition:
sensor.in_range:
id: eval
above: 20.0
or:
-sensor.in_range:
id: mval
above: 5
then:
- script.execute: toggle_a0_with_cooldown
custom_spatial_motion_value:
name: "Motion Energy"
id: mval
That def. doesn’t look right. Thanks a lot for your help.