This is my Automation now, still the same error.
- alias: Turn on/off Main Bathroom Light using sensor4
trigger:
- platform: mqtt
topic: "zigbee2mqtt/IKEA Sensor 4"
payload: true
value_template: "{{ value_json.occupancy }}"
action:
- choose:
- conditions:
- condition: time
after: '01:00:00'
before: '06:00:00'
- condition: state
entity_id: light.master_bathroom
state: "off"
sequence:
- service: light.turn_on
target:
entity_id: light.master_bathroom
data:
brightness: 35
color_temp: 554
- delay:
minutes: 3
- service: light.turn_off
target:
entity_id: light.master_bathroom
- conditions:
- condition: state
entity_id: light.master_bathroom
state: "off"
sequence:
- service: light.turn_on
target:
entity_id: light.master_bathroom
data:
brightness: 255
color_temp: 225
- delay:
minutes: 3
- service: light.turn_off
target:
entity_id: light.master_bathroom
default: []
mode: restart
Can you spot any more errors?