Add switch platform

This commit is contained in:
ludeeus
2019-03-10 15:55:33 +01:00
parent 6ab2f89a30
commit 56d61a8c1f
6 changed files with 102 additions and 13 deletions

View File

@ -27,8 +27,9 @@ _Component to integrate with [blueprint][blueprint]._
Platform | Description
-- | --
`binary_sensor` | Show something `True` or `False`
`binary_sensor` | Show something `True` or `False`.
`sensor` | Show info from blueprint API.
`switch` | Switch something `True` or `False`.
![example][exampleimg]
@ -48,6 +49,7 @@ custom_components/blueprint/__init__.py
custom_components/blueprint/binary_sensor.py
custom_components/blueprint/const.py
custom_components/blueprint/sensor.py
custom_components/blueprint/switch.py
```
## Example configuration.yaml
@ -60,6 +62,9 @@ blueprint:
sensor:
- enabled: true
name: My custom name
switch:
- enabled: true
name: My custom name
```
## Configuration options
@ -84,6 +89,13 @@ Key | Type | Required | Default | Description
`name` | `string` | `False` | `blueprint` | Custom name for the entity.
### Configuration options for `switch` list
Key | Type | Required | Default | Description
-- | -- | -- | -- | --
`enabled` | `boolean` | `False` | `False` | Boolean to enable/disable the platform.
`name` | `string` | `False` | `blueprint` | Custom name for the entity.
## Contributions are welcome!
If you want to contribute to this please read the [Contribution guidelines](CONTRIBUTING.md)