Can I get some help i know that everythign up until the action is good
alias: prinmary-emaillightflash
description: flash lights on arrival of email in the INBOX folder
trigger:
platform: state
entity_id: sensor.imap_valera3025_gmail_com_primary
to: ~
condition:
- condition: template
value_template: >-
{{ trigger.from_state.state|float < trigger.to_state.state|float }} - condition: time
after: “08:00:00”
before: “21:00:00”
action: - if:
- condition: state
platform: state
entity_id: light.studs_front_desk_left
from: ‘on’
then:- service: light.turn_on
target:
entity_id:- light.studs_front_desk_left
- light.studs_room_rear_left
- light.studs_room_rear_right
data:
brightness: 200
rgbw_color: [0,0,255,0]
- delay: “00:00:01”
- service: light.turn_on
target:
entity_id:
- light.studs_front_desk_left
- light.studs_room_rear_left
- light.studs_room_rear_right
data:
brightness: 255
kelvin: 6535
else: - service: light.turn_on
target:
entity_id:- light.studs_front_desk_left
- light.studs_room_rear_left
- light.studs_room_rear_right
data:
brightness: 200
rgbw_color: [0,255,0,0]
- delay: “00:00:01”
- service: light.turn_off
target:
entity_id:
- light.studs_front_desk_left
- light.studs_room_rear_left
- light.studs_room_rear_right
- service: light.turn_on
- condition: state