Hello,
I’d like to say a huge thankyou to everyone on this forum for their ideas and projects which has inspired me to start building my own automation system.
The problem
I’ve currently got a few Sonoffs flashed with Tasmota as ceiling light switches which work very well, my problem was that I wanted my two bedside lamps (Also sonoffs running tasmota) controllable by the same lightswitch, I could have replaced the fascia and pulled through more cable to achieve this but was more effort than it would have been worth so I started to look at the software side.
The Solution
I wanted to be able to turn the switch on and turn it off quickly to turn the lamps on. So I used the timeout function to abort the automation if the lightswitch hasn’t been turned off within the 2 second limit, this works perfectly!
- timeout: 00:00:2
wait_template: '{{ states.light.master_bedroom_light.state == ''off'' }}'
- data:
entity_id:
- light.bedside_lamp_1
- light.bedside_lamp_2
service: light.toggle
alias: Lighting (Master bedroom shortcut)
condition: []
id: '1512042817409'
trigger:
- entity_id: light.master_bedroom_light
from: 'off'
platform: state
to: 'on'
I know it’s only small but I thought I’d give something back to the community.