Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95365

2x light automations with one stateless switch possible?

$
0
0

@Lee_au wrote:

Hi all,

I’m trying to create an automation for my wife to switch on all the house lights (in case of a noise etc), and also to switch off any lights currently left on when we go to bed.

I have a ‘button’ which doesn’t report on or off - it’s basically a momentary switch.

How would I go about doing this without using the toggle command? My concern is especially for the turning off phase where anything that might already be off would then come on. I can’t really understand what conditions I could use. Hoping someone smarter than me can assist please! :crazy_face:

- id: '1237834192486'
  alias: Turn ON ALL LIGHTS
  trigger:
  - event_data:
      click_type: single
      unique_id: 00:12:4b:00:1b:d3:bc:ce:1:0x0006
    event_type: zha_event
    platform: event
  condition: []
  action:
    - service: notify.pushbullet
      data:
        message: 'Turning ON all the lights!'
        title: 'Hallway Switch'
    - service: homeassistant.turn_on
      entity_id: 
        - switch.hall
        - switch.backyard
        - light.driveway
        - light.entry
        - switch.kitchen
        - switch.laundry
        - light.living_room
        - switch.pantry
        - light.patio
        - light.porch
        - switch.pendants
        - light.rumpus
        - light.stair
        - switch.stair_light_1
        - switch.stair_light_2
        - switch.stair_light_3
        - switch.stair_light_4

Posts: 8

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95365

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>