Thanks! Will try.
I created a cover with quietdrift speed selection using an input select helper. The input select has choices Langzaam, Stil en Snel (Dutch for slow, quiet, fast). I renamed the original cover and set it to not visible in the settings to avoid using it by accident. Then I created a cover template and a script to implement a speed controlled cover.
This I put in configuration.yaml
cover: !include covers.yaml
This is the template cover, I put the code in covers.yaml:
- platform: template
covers:
woonkamergordijn_links:
unique_id: cover.woonkamergordijn_links
friendly_name: "Woonkamergordijn links"
device_class: curtain
position_template: "{{ state_attr('cover.onveilig_linker_wkgordijn', 'current_position') }}"
value_template: "{{ states('cover.onveilig_linker_wkgordijn') }}"
availability_template: "{{ states('cover.onveilig_rechter_wkgordijn') != 'unavailable' }}"
open_cover:
action: script.zet_positie_woonkamergordijn_links
data_template:
position: 100
close_cover:
action: script.zet_positie_woonkamergordijn_links
data_template:
position: 0
set_cover_position:
action: script.zet_positie_woonkamergordijn_links
data_template:
position: "{{ position }}"
stop_cover:
action: cover.stop_cover
target:
entity_id: cover.onveilig_linker_wkgordijn
And this is the script that uses the quietdrift custom action:
alias: Zet positie woonkamergordijn links
sequence:
- action: cover.v6_set_switchbot_curtain_position
data_template:
speed: >-
{{ 1 if is_state('input_select.woonkamergordijnen_snelheid', 'Langzaam')
else
2 if is_state('input_select.woonkamergordijnen_snelheid', 'Stil') else 255 }}
position: "{{position}}"
entity_id: cover.onveilig_linker_wkgordijn
mode: single
icon: mdi:curtains
description: ""
The pull request for PySwitchBot just adds speed control to the library. However, HA doesn’t allow you to configure it. And this is essentially what v6-quietdrift does: It allows you to set the speed parameter.
Groups aren’t supported in v6-quietdrift, because I haven’t needed them. You can list all the curtains instead.
I think this happens when you add a group using the switchbot app. Adding them individually and creating the group inside home assistant should do the trick
@breph in case i do not use group and control left one - it immediately starts movement of the right one,
in case i control right one - left one doesnt move… thats why i am not sure if thats a bug…
I created extra group as was recco by @sender, but in case i want to control each side separately doesnt work as expected - or maybe i do miss something.
Make every curtain indeed separate in switchbot app. Then group in HA…
@sender i think in case u ungroup them inside the switchbot app - there will be an issue with calibration.
Nope. Calibrate them separately.
It works perfectly here.
@sender so you calibrate each one ie left/right side separately… dont group them inside (both using switchbot app);
once done you group them in HA or control each side separately, correct? thx
Separate in switchbot app yes and group cover in HA
I’m having trouble not getting an error with this. Here’s my code, I’m sure I’m leaving something out!
alias: Living Room - Close Curtains at Sunset
description: ""
triggers:
- trigger: sun
event: sunset
offset: 0
conditions:
- condition: state
entity_id: input_boolean.vacation_mode
state: "off"
- condition: state
entity_id: binary_sensor.workday_sensor
state: "off"
actions:
- data:
speed: 1
position: 100
entity_id:
- cover.curtain_3_18cd
action: v6_quietdrift.set_switchbot_curtain_position
- action: cover.close_cover
metadata: {}
data: {}
target:
entity_id: cover.living_room_blinds
mode: single
Not sure what’s the question (what is expected behavior, what is actual behavior).
However, od you want to close the Curtains, you need to set the position to 0, not 100. Yes, this is counter-intuitive for me, but the custom component just matches HA.
I’m an idiot, thanks!
I swear I read through all the docs, but I can be blind at times. Really appreciate you writing this and putting up with silly questions!
Is this currently the best method for getting quiet drift/quiet movement with Curtain 3 model? I have heard using quiet mode drains your battery a lot, but I think I’d prefer quiet movement for luxury.
I tried it twice and then I decided to go with normal. Quiet is so terribly slow and it still makes noise, but a little less indeed. But way longer…
This looks like it uses SwitchBot REST API. So, IIUC, you need:
- An Internet connection
- Switchbot to be somehow connected to the SwitchBot cloud (through their gateway?)
I prefer local connection, so I prefer the custom component to the REST API.
I prefer Quiet drift for small position adjustments. When I want to fully open the curtains because of opening the windows, I want it quick. So, both have their place.
Where’s the local method posted? Is it this GitHub - v6ak/v6-quietdrift: Home Assistant custom component that implements QuietDrift for SwitchBot Curtain 3 and if so, how do I install it?
HACS has it
Thanks, I had to add the gitrhub url as a custom repo. Got it working now and works great.
I only use the quiet drift to close the curtains near dawn if I have left them open to get air circulation during the night. This way they don’t wake me up. It is quieter enough that they don’t wake me up in quiet drift. In every other situation quiet drift is just too slow to be practical. If it was completely silent then maybe but it still makes some noise.