Select multiple entities to link their on/off state. If any selected entity is turned on or off, the other selected entities will be sent a matching on or off command.
You can select any entity, but only entities supported by the homeassistant.turn_on or homeassistant.turn_off service calls will work.
Requirements
All selected entities MUST suport homeassistant.turn_on and homeassistant.turn_off or errors will be logged and the blueprint will not work.
@luma thank you for this great blueprint. I need your help as I have an issue with it.
Iā have 1 Sonoff Mini connected to 2 switches. One of them connected to a light bulb.
What I want to achieve is simple: either switch powen on/off the light
Iāve used the blueprint and put mini1 and mini2 as entities.
Both support the turn_on turn_off.
The funny thing is that they work 60% of the time, more or less.
Meaning this is expected:
I press switch 1 to on ā switch 2 goes on
I press switch 1 to off ā swith 2 goes off
I press switch 2 to on ā switch 1 goes on
I press switch 2 to off ā swith 1 goes off
now it happens almost a third of the time that I press either 1 or 2 in on/off but the other switch does not commute.
Initially I though it was a 1->2 working and 2->1 not working, while is not like that if I repeat the on/of on the same switch sometimes works, sometimes does not work
Am I the only one whoās happening? how can I diagnose?
any help?
I use this blueprint to link a zwave wall switch that operates an outlet (nothing connected) with two zwave smart outlets on the other side of the room that operate bedside lamps. The blueprint operates correctly most of the time, often some of the smart outlets are very slow to turn on or off. (at times multiple seconds). None of this behavior is a problem, just a bit odd that it takes so much time to complete the automation.
Tonight a very strange sequence happened where the on/off triggers were operating sequentially. After turning on the wall switch, the three switches were in an open loop turning on and off and not stopping. I had to disable the blueprint to stop it. (It was quite a show that freaked my wife, she thought I had planted a Halloween treat for her! )
The logbook shows the on/off sequence triggering from other switches in the list.
I have not yet determined what happened. Is it possible that state change operation is not waiting for completion before moving on?
I saw this previously in another application of the same blueprint but triggered instead by an OR of three motion detectors. (Any motion triggers an action of one of three linked light switches) This re-triggering of on/off was quite regular, occurring most of the time. Until tonight I thought that this was a side effect of the motion detectors.
Thanks to this Blueprint, Thanks @luma . I was following since @hebus timeā¦great blueprint until the the āunavailableā error occurs on the latest HA update.
Solid work @luma. Will you make an update to add in presets, effects and/or effects? Lights Iāve linked to these switches donāt survive notification blinks with their color intact.
Hi all, noob here. In regards to this blueprint I only want it to happen during certain times and days of the week. Can I assume that I can just insert the below code into this code under the conditions section?
All good. I sorted it out with some code from Twanneās blueprint_day_time_condition. Added this to the blueprint and now it works between days and time that are specified. If anyone is interested this is how I set it up
For my situation, I have a device that reports unavailable when HA restarts. Therefor, Iāve added an extra condition template to have it not trigger the automation when the state of a device changes āfrom unavailableā:
Thanky for this blueprint !
I used it to link a ZWave in-wall-switch to a Hue Zigbee ceiling lamp (complex with many lights).
Sadly, I found an error I canāt quite get behind :
Using the Home Assistant app / Lovelace UI everything works as expected. I can even see the switch state change as expected.
When using the switch alone, everything works as expected
Here comes the error :
When I change the state over the UI / App, I canāt change the state using the switch for some seconds (something like 4-5 seconds)
Does anyone have an idea what it might be ?
Thanks !
View the traces in your automation and check the timestamps to find where the delay is happening. Either the master switch is slow to report, or your slave switch is slow to respond.
This is a great blueprint, thank you! One question, is there a way to still operate the switches individually? Most of the times I want all of the switches to turn on/off at the same time, but there are occasions when I would only one to turn on. Can this be achieved? (Ideally Iād like to create a āmasterā switch for all the switches, but then also retain all the idividual switches).
Thanks
edit: just figured out i can do this with a Group Helper
Edit 2: is there a way to add Helpers to dashboard??
I use this to link a wifi wall switch with a wifi power inline on a light cord. Very simple setup.
Yesterday I had it freak out on me after turning the wall switch off and on quickly by mistake, then trying to turn it off again. They both start toggling on and off continuously for about 10 seconds. Never seen this before.
Getting many errors in log from you 1.1 script (15.000 errors in 2 days).
Logger: homeassistant.components.automation
Source: components/automation/__init__.py:1006
Integration: Automatisierung ([documentation](https://www.home-assistant.io/integrations/automation), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+automation%22))
First occurred: 18:27:00 (645 occurrences)
Last logged: 19:09:00
* Error evaluating condition in 'Link_SpĆ¼le_Alexa': In 'condition' (item 1 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'to_state' In 'condition' (item 2 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'to_state' In 'condition' (item 3 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'to_state' In 'condition' (item 4 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'from_state'
* Error evaluating condition in 'Link_Badstreifen_Alexa': In 'condition' (item 1 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'to_state' In 'condition' (item 2 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'to_state' In 'condition' (item 3 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'to_state' In 'condition' (item 4 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'from_state'
* Error evaluating condition in 'Link_Werkbank_Alexa': In 'condition' (item 1 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'to_state' In 'condition' (item 2 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'to_state' In 'condition' (item 3 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'to_state' In 'condition' (item 4 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'from_state'
* Error evaluating condition in 'Link_Werkstatt_Alexa': In 'condition' (item 1 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'to_state' In 'condition' (item 2 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'to_state' In 'condition' (item 3 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'to_state' In 'condition' (item 4 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'from_state'
* Error evaluating condition in 'Link_Unten_Alexa': In 'condition' (item 1 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'to_state' In 'condition' (item 2 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'to_state' In 'condition' (item 3 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'to_state' In 'condition' (item 4 of 4): In 'template' condition: UndefinedError: 'dict object' has no attribute 'from_state'
Can you tell me whats wrong here? (Links are working flawlessly)