time:
  - platform: sntp
    id: sntp_time
    timezone: ${timezone}
    update_interval: 1h
    on_time:
      - cron: ${schedule_grow_on}
        then:
          - lambda: |-
              if (id(schedule).state == "Grow") {
                id(power_light).turn_on();
              }
      - cron: ${schedule_grow_off}
        then:
          - lambda: |-
              if (id(schedule).state == "Grow") {
                id(power_light).turn_off();
              }
      - cron: ${schedule_bloom_on}
        then:
          - lambda: |-
              if (id(schedule).state == "Bloom") {
                id(power_light).turn_on();
              }
      - cron: ${schedule_bloom_off}
        then:
          - lambda: |-
              if (id(schedule).state == "Bloom") {
                id(power_light).turn_off();
              }
      - seconds: 0
        minutes: /1
        then:
          - script.execute: light_power_state
      - seconds: 0
        minutes: /1
        then:
          - script.execute: fan_power_state
