Hello all,
I have the following configuration. 2 electric roller blinds in one room (one long and one short), both equipped with a shelly 2.5 each. The shelly of the long shutter is additionally connected to a physical push button.
Everything works perfectly in HA (with the Shelly integration) when I control everything via the UI. Now I would like to use the physical button, which should then drive both blinds and not only the one with which it is connected by cable.
My idea was to solve this via automations, but somehow I don’t know how.
Scenario: If you press the button down the long roller goes off and at the same time by automation should also go the short roller blind. If you press the button for stop, the long roller blind stops (because it is connected by cable) and the short roller blind should then also be stopped and its position synchronized with the long one (because it closes much faster). The same when pressing the button for the opening of the blind.
I have unfortunately no idea or did not managed to get this somehow.
I know that with 2 blinds it could be solved directly in the shelly via URL Action, but since I would like to implement this scenario with a master switch for the whole house, I would like to implement it with this simple example and then adapt it.
I hope someone has done something like this before and could post an example.
Thanks a lot!
You could create an automation which has a trigger of any state change in the long shutter, then an action to set the position of the short cover to that value.
id: blah
alias: blah blah
trigger:
- platform: state
entity_id: cover.YOUR_LONG_BLIND
condition:
- condition: state
entity_id: input_boolean.cover_auto
state: 'on'
action:
- service: cover.set_cover_position
entity_id: cover.YOUR_SHORT_BLIND
I added in the input_boolean as a way of creating an ‘auto’ mode switch but you could leave it out
Thank you for your reply.
The most interesting part for me would be, how you set the value in your action block?
i mean how do you get the position of the long cover to set it in set_cover_position on the short blind?
Yeah… sorry, I was rushing to get out of the office.
There needs to be a reference to the position attribute of the long blind in that service call. On my phone at the moment so a bit hard to fix it up for you.
The action would need to use template to then set the cover.set_cover_position to be the same as the current_position of the long blind.
This would get the long_blind position;
value_template: "{{state_attr ('cover.long_blind', 'current_position')}}"
i managed to get things running with this automation:
alias: test
description: ''
trigger:
- platform: state
entity_id: cover.rollo_lang
condition: []
action:
- service: cover.set_cover_position
target:
entity_id: cover.rollo_kurz
data:
position: '{{state_attr(''cover.rollo_lang'', ''current_position'')}}'
mode: single
Thank you for your hints.
But the delay until automation get’s trigger is not so nice. It takes about 13-20 seconds between pressing the physical button and the reaction of the short cover.
Any hints on that?
I’d say that is simply due to the delay in the Shelly updating HA with it’s current position so I doubt it can be made any better.
Glad I could help, sorry I didn’t include the attribute template in my original example. Thats what happens when you rush things!
Finaly found it! Thank you for your great help. Everything is smooth and without delay now, because i missed that little sentense in the documentation after changing the CoIoT peer:
“… After changing the CoIoT peer, the Shelly device needs to be manually restarted …”
After changing the CoIoT peer to the HA instance and restarting the device, everything was fine.