From 4e61a273bcd7ef0ef6a601875439dd7f1abaf737 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Fri, 17 Feb 2023 16:07:27 +1300 Subject: [PATCH] Switchbot blind tilt support (#26127) Co-authored-by: BelowAverageDeveloper <90269575+BelowAverageDev@users.noreply.github.com> Co-authored-by: J. Nick Koston --- source/_integrations/switchbot.markdown | 51 +++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/source/_integrations/switchbot.markdown b/source/_integrations/switchbot.markdown index 8087e3519c1..3ea76769f54 100644 --- a/source/_integrations/switchbot.markdown +++ b/source/_integrations/switchbot.markdown @@ -61,6 +61,7 @@ Please note, device names configured in the SwitchBot app are not transferred in - Motion Sensor (WoPresence) - Plug Mini (WoPlug), both the original (model W1901400) and HomeKit-enabled (model W1901401) - Lock (WoLock) +- Blind Tilt (WoBlindTilt) ## SwitchBot Entity @@ -107,6 +108,56 @@ Encryption key: For instructions on how to obtain the locks encryption key, see README in [PySwitchbot](https://github.com/Danielhiversen/pySwitchbot#obtaining-locks-encryption-key) project. +## SwitchBot Blind Tilt + +The blind tilt is exposed as a cover entity with control of the tilt position only: + +| Tilt Position | Blind State | +| ------------- | ----------- | +| 100% | Closed Up | +| 50% | Fully Open | +| 0% | Closed Down | + +The close button will close the blinds to the closest closed position (either 0% or 100%), and defaults to closing down if the blinds are fully open. Because Home Assistant believes 100% is open, the default cards will disable the open button when the tilt is at 100%, but the service call will still work and open the blind to 50%. + +### Simple cover template entity + +Some integrations may expose your SwitchBot Blind Tilt to other services which expect that 100% is open and 0% is fully closed. Using a [Cover Template](/integrations/cover.template), a proxy entity can be created which will be open at 100% and closed at 0%. This template entity is limited to closing in one direction. + +{% raw %} + +```yaml +# Example configuration.yaml entry +cover: + - platform: template + covers: + example_blinds_simple: + device_class: blind + friendly_name: Example Blinds (Simple Down) + open_cover: + service: cover.set_cover_tilt_position + data: + tilt_position: 50 + target: + entity_id: cover.example_blinds + close_cover: + service: cover.set_cover_tilt_position + data: + tilt_position: 0 + target: + entity_id: cover.example_blinds + position_template: > + {{ int(states.cover.example_blinds.attributes.current_tilt_position)*2 }} + set_cover_position: + service: cover.set_cover_tilt_position + data: + tilt_position: "{{position/2}}" + target: + entity_id: cover.example_blinds +``` + +{% endraw %} + ## Error codes and troubleshooting The SwitchBot integration will automatically discover devices once the [Bluetooth](/integrations/bluetooth) integration is enabled and functional.