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