Snippets

Winni Neessen Nachtlicht Steuerung HASS.io

Created by Winni Neessen
## Dummy condition switches
input_boolean:
  nachtlicht_bool:
    name: Conditional Switch for Nachtlicht Steuerung

automation:
  - alias: 'Nachtlicht an bei Bewegung wenn nach 11'
    trigger:
      platform: state
      entity_id: sensor.wohnzimmer_motion
      to: '1'
    condition:
      condition: and
      conditions:
        - condition: state
          entity_id: light.ikea_stehlampe
          state: 'off'
        - condition: time
          after: '22:30:00'
          before: '09:00:00'
    action:
      - service: light.turn_on
        entity_id: light.ikea_stehlampe
        data:
          transition: 2
          brightness: 50
          color_temp: 445
      - service: light.turn_on
        entity_id: light.deckenspot_eingang
        data:
          transition: 2
          brightness: 50
          color_temp: 445
      - service: input_boolean.turn_on
        entity_id: input_boolean.nachtlicht_bool
  - alias: 'Nachtlicht aus bei keiner Bewegung wenn nach 11'
    trigger:
      platform: state
      entity_id: sensor.wohnzimmer_motion
      to: '0'
      for:
        minutes: 5
    condition:
      condition: and
      conditions:
        - condition: state
          entity_id: light.ikea_stehlampe
          state: 'on'
        - condition: time
          after: '22:30:00'
          before: '09:00:00'
        - condition: state
          entity_id: input_boolean.nachtlicht_bool
          state: 'on'
    action:
      - service: light.turn_off
        entity_id: light.ikea_stehlampe
      - service: light.turn_off
        entity_id: light.deckenspot_eingang
      - service: input_boolean.turn_off
        entity_id: input_boolean.nachtlicht_bool

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.