It was, but I just re-copied and pasted it.
Sun shows as below_horizon.
It was, but I just re-copied and pasted it.
Sun shows as below_horizon.
Okay, comment out the whole condition bit and make sure that it’s triggering the automation, the lights should go to 25% when you walk past.
Cut out the whole condition, nothing.
- alias: 'Lights On'
initial_state: on
trigger:
platform: state
entity_id: binary_sensor.vision_zp3111_multisensor_4in1_sensor
to: 'on'
action:
- service: light.turn_on
data_template:
entity_id: light.level_2
brightness_pct: >
{% if (now().hour >= 22) or (now().hour <=7) %} 25
{% else %} 100 {% endif %}
Do I need to add a from: 'off'
in there, do you think?
No, if it’s a binary sensor it can only be from off
Check in the states panel that the sensor is showing on and the automation is showing on?
Alright, so the motion sensor turns on but apparently the vision_zp3111 doesn’t and I’m confused as to why it wouldn’t be.
What other sensors are created by that node? My fibaro multisensor has one called ‘Burglar’ which shows 0 for no motion, 8 for motion and 254 for sleep.
I also have a burglar one, which shows 0 for no motion, 254 for motion. There is also an alarm level, alarm type, clock, luminance, power management, humidity, temperature, and source node ID.
OK, put the conditions back, and change the entity_id in your trigger to the Burglar entity and the to line to
to: '254`
(and your lights off automations will need to be to: '0'
)
I was wrong re: the number. The number was 8…but replaced everything. It now looks like this:
- alias: 'Lights Off'
initial_state: on
trigger:
platform: state
entity_id: sensor.vision_zp3111_multisensor_4in1_burglar
from: '8'
to: '0'
for:
hours: 0
minutes: 0
seconds: 30
action:
service: light.turn_off
entity_id: light.level_2
- alias: 'Lights On'
initial_state: on
trigger:
platform: state
entity_id: sensor.vision_zp3111_multisensor_4in1_burglar
to: '8'
condition:
condition: or
conditions:
- condition: sun
before: sunrise
- condition: and
conditions:
- condition: sun
after: sunset
- condition: time
after: '18:00:00'
action:
- service: light.turn_on
data_template:
entity_id: light.level_2
brightness_pct: >
{% if (now().hour >= 22) or (now().hour <=7) %} 25
{% else %} 100 {% endif %}
The lights turned on when the reset took place, but the burglar sensor is apparently stuck. It hasn’t switched from “8” to “0” in over 5 minutes, which isnt’ what it’s supposed to be doing.
OK, the automation is working as it should. You’ll need to set the device up in the Zwave control panel.
It’s nearly 4am here and I don’t want to give you bad advice due to tiredness, so please please please double check the properties, but you’re looking for options like ‘blind time’ and/or timeout. Setting these defines how long it takes to reflect ‘no motion’.
… On my fibaro it’s ‘blind time’ and ‘window time’, but it’s trial and error because its not done in seconds, it’s done in units.