renemarc/home-assistant-config

View on GitHub
automations/devices/kitchen_lights_full.yaml

Summary

Maintainability
Test Coverage
#
# Turn kitchen lights full on
#
# Set all kitchen lights to maximum brightness when Flic button is held.
#
# @publish input_boolean.kitchen_lights_override
#
# @see /automations/cct_limitlessled.yaml
#
- id: kitchen_lights_full
  alias: "Kitchen Lights FULL"

  trigger:
    # When Minimote button 3 is held.
    - platform: event
      event_type: zwave.scene_activated
      event_data:
        entity_id: zwave.minimote
        scene_id: 6 # 6 = button #3 held.

    # When kitchen Flic button is held.
    - platform: event
      event_type: flic_click
      event_data:
        button_name: "flic_80e4da72e890"
        click_type: 'hold'

  action:
    # Turn on all lights.
    - service: homeassistant.turn_on
      data:
        entity_id:
          - group.kitchen_lights
        brightness_pct: 100

    # Force kitchen lights override.
    - service: homeassistant.turn_off
      data:
        entity_id: input_boolean.kitchen_lights_override
    - service: homeassistant.turn_on
      data:
        entity_id: input_boolean.kitchen_lights_override