Remove switch
This commit is contained in:
parent
20a36692e7
commit
bac1074a71
15
README.md
15
README.md
@ -29,7 +29,6 @@ Platform | Description
|
||||
-- | --
|
||||
`binary_sensor` | Show something `True` or `False`
|
||||
`sensor` | Show info from blueprint API.
|
||||
`switch`| Switchable device.
|
||||
|
||||
![example][exampleimg]
|
||||
|
||||
@ -49,7 +48,6 @@ custom_components/blueprint/__init__.py
|
||||
custom_components/blueprint/binary_sensor.py
|
||||
custom_components/blueprint/const.py
|
||||
custom_components/blueprint/sensor.py
|
||||
custom_components/blueprint/sensor.py
|
||||
```
|
||||
|
||||
## Example configuration.yaml
|
||||
@ -62,9 +60,6 @@ blueprint:
|
||||
sensor:
|
||||
- enabled: true
|
||||
name: My custom name
|
||||
switch:
|
||||
- enabled: true
|
||||
name: My custom name
|
||||
```
|
||||
|
||||
## Configuration options
|
||||
@ -73,8 +68,6 @@ Key | Type | Required | Description
|
||||
-- | -- | -- | --
|
||||
`binary_sensor` | `list` | `False` | Configuration for the `binary_sensor` platform.
|
||||
`sensor` | `list` | `False` | Configuration for the `sensor` platform.
|
||||
`switch` | `list` | `False` | Configuration for the `switch` platform.
|
||||
|
||||
|
||||
### Configuration options for `binary_sensor` list
|
||||
|
||||
@ -90,14 +83,6 @@ Key | Type | Required | Default | Description
|
||||
`enabled` | `boolean` | `False` | `False` | Boolean to enable/disable the platform.
|
||||
`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.
|
||||
|
||||
|
||||
***
|
||||
|
||||
[exampleimg]: example.png
|
||||
|
@ -14,8 +14,8 @@ from homeassistant.helpers import discovery
|
||||
from homeassistant.util import Throttle
|
||||
from .const import (
|
||||
DOMAIN_DATA, DOMAIN, ISSUE_URL, PLATFORMS, REQUIRED_FILES, STARTUP, URL,
|
||||
VERSION, CONF_BINARY_SENSOR, CONF_SENSOR, CONF_SWITCH, CONF_ENABLED,
|
||||
CONF_NAME, DEAFULT_NAME)
|
||||
VERSION, CONF_BINARY_SENSOR, CONF_SENSOR, CONF_ENABLED, CONF_NAME,
|
||||
DEAFULT_NAME)
|
||||
|
||||
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=30)
|
||||
|
||||
@ -31,17 +31,11 @@ SENSOR_SCHEMA = vol.Schema({
|
||||
vol.Optional(CONF_NAME, default=DEAFULT_NAME): cv.string,
|
||||
})
|
||||
|
||||
SWITCH_SCHEMA = vol.Schema({
|
||||
vol.Optional(CONF_ENABLED, default=False): cv.boolean,
|
||||
vol.Optional(CONF_NAME, default=DEAFULT_NAME): cv.string,
|
||||
})
|
||||
|
||||
CONFIG_SCHEMA = vol.Schema({
|
||||
DOMAIN: vol.Schema({
|
||||
vol.Optional(CONF_BINARY_SENSOR): vol.All(
|
||||
cv.ensure_list, [BINARY_SENSOR_SCHEMA]),
|
||||
vol.Optional(CONF_SENSOR): vol.All(cv.ensure_list, [SENSOR_SCHEMA]),
|
||||
vol.Optional(CONF_SWITCH): vol.All(cv.ensure_list, [SWITCH_SCHEMA]),
|
||||
}),
|
||||
}, extra=vol.ALLOW_EXTRA)
|
||||
|
||||
|
@ -29,10 +29,8 @@ BINARY_SENSOR_DEVICE_CLASS = 'connectivity'
|
||||
# Configuration
|
||||
CONF_BINARY_SENSOR = 'binary_sensor'
|
||||
CONF_SENSOR = 'sensor'
|
||||
CONF_SWITCH = 'switch'
|
||||
CONF_ENABLED = 'enabled'
|
||||
CONF_NAME = 'name'
|
||||
|
||||
|
||||
# Defaults
|
||||
DEAFULT_NAME = DOMAIN
|
||||
|
Loading…
x
Reference in New Issue
Block a user