Skip to content

Commit 1b99a8c

Browse files
authored
Merge pull request home-assistant#597 from n8henrie/issue_1949
Combine Garage and Rollershutter Components -> Cover (home-assistant#1949)
2 parents c8fafbb + 5602df3 commit 1b99a8c

File tree

5 files changed

+203
-0
lines changed

5 files changed

+203
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
layout: page
3+
title: "Command Line Cover"
4+
description: "How to control a cover with the command line."
5+
date: 2016-06-28 17:30
6+
sidebar: true
7+
comments: false
8+
sharing: true
9+
footer: true
10+
logo: command_line.png
11+
ha_category: Cover
12+
---
13+
A cover platform that issues specific commands when it is moved up, down and
14+
stopped. It allows anyone to integrate any type of cover into Home Assistant
15+
that can be controlled from the command line.
16+
17+
To enable a command line cover in your installation, add the following to your
18+
`configuration.yaml` file:
19+
20+
```yaml
21+
# Example configuration.yaml entry
22+
cover:
23+
- platform: command_line
24+
covers:
25+
Garage door:
26+
open_cmd: move_command up kitchen
27+
close_cmd: move_command down kitchen
28+
stop_cmd: move_command stop kitchen
29+
state_cmd: state_command kitchen
30+
value_template: {% raw %}>
31+
{% if value == 'open' %}
32+
100
33+
{% elif value == 'closed' %}
34+
0
35+
{% endif %}
36+
{% endraw %}
37+
```
38+
39+
Configuration variables:
40+
41+
- **covers** (*Required*): The array that contains all command line covers.
42+
- **entry** (*Required*): Name of the command line cover. Multiple entries
43+
are possible.
44+
- **open_cmd** (*Required*): The command to open the cover.
45+
- **close_cmd** (*Required*): The action to close the cover.
46+
- **stop_cmd** (*Required*): The action to stop the cover.
47+
- **state_cmd** (*Optional*): If given, this will act as a sensor that runs
48+
in the background and updates the state of the cover. If the command
49+
returns a `0` the indicates the cover is fully closed, whereas a 100
50+
indicates the cover is fully open.
51+
- **value_template** (*optional - default: '{% raw %}{{ value }}{% endraw
52+
%}'*): if specified, `state_cmd` will ignore the result code of the
53+
command but the template evaluating will indicate the position of the
54+
cover. For example, if your `state_cmd` returns a string "open",
55+
using `value_template` as in the example config above will allow you to
56+
translate that into the valid state `100`.

source/_components/cover.markdown

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
layout: page
3+
title: "Covers"
4+
description: "Instructions how to integrate covers into Home Assistant."
5+
date: 2016-06-28 17:30
6+
sidebar: true
7+
comments: false
8+
sharing: true
9+
footer: true
10+
---
11+
12+
Home Assistant can give you an interface to control covers such as
13+
rollershutters and garage doors.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
layout: page
3+
title: "MQTT Cover"
4+
description: "Instructions how to integrate MQTT covers into Home Assistant."
5+
date: 2016-06-28 17:30
6+
sidebar: true
7+
comments: false
8+
sharing: true
9+
footer: true
10+
logo: mqtt.png
11+
ha_category: Cover
12+
---
13+
14+
15+
The `mqtt` cover platform enables the possibility to control an MQTT
16+
cover. The device state will be updated only after receiving the a new
17+
state from `state_topic`. If these messages are published with RETAIN flag, the
18+
MQTT device will receive an instant state update after subscription and will
19+
start with correct state. Otherwise, the initial state will be `unknown`.
20+
21+
There is a state attribute that stores the relative position of the device,
22+
where 0 means the device is `closed` and all other intermediate positions
23+
means the device is `open`.
24+
25+
When a state topic is not available, the switch will work in optimistic mode.
26+
In this mode, the switch will immediately change state after every command.
27+
Otherwise, the switch will wait for state confirmation from device (message
28+
from `state_topic`).
29+
30+
Optimistic mode can be forced, even if state topic is available. Try to enable
31+
it, if experiencing incorrect switch operation.
32+
33+
To use your MQTT binary sensor in your installation, add the following to your
34+
`configuration.yaml` file:
35+
36+
```yaml
37+
# Example configuration.yml entry
38+
cover:
39+
platform: mqtt
40+
state_topic: "home-assistant/cover"
41+
command_topic: "home-assistant/cover/set"
42+
name: "MQTT Sensor"
43+
optimistic: false
44+
qos: 0
45+
retain: true
46+
state_open: "STATE_OPEN"
47+
state_closed: "STATE_CLOSED"
48+
service_open: "SERVICE_OPEN"
49+
service_close: "SERVICE_CLOSE"
50+
value_template: '{% raw %}{{ value.x }}{% endraw %}'
51+
```
52+
53+
Configuration variables:
54+
55+
- **state_topic** (*Required*): The MQTT topic subscribed to receive sensor values.
56+
- **name** (*Optional*): The name of the sensor. Default is 'MQTT Sensor'.
57+
- **state_open** (*Optional*): The payload that represents open state. Default is"STATE_OPEN"
58+
- **state_closed** (*Optional*): The payload that represents closed state. Default is "STATE_CLOSED"
59+
- **service_open** (*Optional*): The payload that represents open state in service mode. Default is"SERVICE_OPEN"
60+
- **service_close** (*Optional*): The payload that represents closed state in service mode. Default is "SERVICE_CLOSE"
61+
- **optimistic** (*Optional*): Flag that defines if switch works in optimistic mode. Default is true if no state topic defined, else false.
62+
- **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages.
63+
- **retain** (*Optional*): If the published message should have the retain flag on or not.
64+
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
65+
66+
For a quick check you can use the commandline tools shipped with `mosquitto` to send MQTT messages. Set the state of your sensor manually:
67+
68+
```bash
69+
$ mosquitto_pub -h 127.0.0.1 -t home-assistant/cover/set -m "OFF"
70+
```
71+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
layout: page
3+
title: "SCSGate Cover"
4+
description: "Instructions how to integrate SCSGate motorized devices into Home Assistant."
5+
date: 2016-06-28 17:30
6+
sidebar: true
7+
comments: false
8+
sharing: true
9+
footer: true
10+
logo: bus_scs.png
11+
ha_category: Cover
12+
---
13+
The SCSGate devices can control motorized covers connected to the BTicino
14+
MyHome system.
15+
16+
To enable SCSGate covers in your installation, add the following to your
17+
`configuration.yaml` file:
18+
19+
```yaml
20+
# Example configuration.yaml entry
21+
cover:
22+
platform: scsgate
23+
devices:
24+
living_room:
25+
name: Living Room
26+
scs_id: XXXXX
27+
```
28+
29+
Configuration variables:
30+
31+
- **devices** (*Required*): A list of devices with their name to use in the
32+
frontend.
33+
34+
**Known limitation:** it is not possible to know the current state of the
35+
cover.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
layout: page
3+
title: "Wink Cover"
4+
description: "Instructions how to setup the Wink garage doors within Home Assistant."
5+
date: 2016-06-28 17:30
6+
sidebar: true
7+
comments: false
8+
sharing: true
9+
footer: true
10+
logo: wink.png
11+
ha_category: Cover
12+
---
13+
14+
Wink cover / garage door functionality is currently limited to view only. Wink
15+
garage doors will still show the current state of the door, but control has
16+
been disabled for third parties. If you have a Chamberlain garage door, and
17+
would like to control it via Home Assistant, please contact Chamberlain and
18+
request that they re-enabled third-party control.
19+
20+
The following quote is from Wink.
21+
22+
> As part of our agreement with Chamberlain, third-party access to control
23+
Chamberlain garage doors has been restricted. Please contact Chamberlain
24+
directly to inquire about permissions.
25+
26+
~~The Wink garage door platform allows you to control your [Wink](http://www.wink.com/) enabled garage door.~~
27+
28+
The requirement is that you have setup your [Wink hub](/components/wink/).

0 commit comments

Comments
 (0)