renemarc/home-assistant-config

View on GitHub
automations/areas/ceiling_on.yaml

Summary

Maintainability
Test Coverage
#
# Turn on ceiling wash lights
#
# If low-power mode is enabled, the `ceiling_low` automation will be used
# instead.
#
# @subscribe input_boolean.low_mode
# @subscribe input_boolean.nap_mode
# @subscribe input_boolean.night_mode
#
# @see /automations/areas/ceiling_low.yaml
#
- id: ceiling_on
  alias: "Ceiling ON"

  trigger:
    # When low-power mode is disabled.
    - platform: state
      entity_id: input_boolean.low_mode
      to: 'off'

    # When nap mode is disabled.
    - platform: state
      entity_id: input_boolean.nap_mode
      to: 'off'

    # When night mode is disabled.
    - platform: state
      entity_id: input_boolean.night_mode
      to: 'off'

  condition:
    # If low-power mode is disabled.
    - condition: state
      entity_id: input_boolean.low_mode
      state: 'off'

    # If nap mode is disabled.
    - condition: state
      entity_id: input_boolean.nap_mode
      state: 'off'

    # If night mode is disabled
    - condition: state
      entity_id: input_boolean.night_mode
      state: 'off'

  action:
    # Turn on ceiling wash lights.
    - service: homeassistant.turn_on
      data:
        entity_id:
          - group.ceiling_lights
        transition: 5