From bac1074a71d50e56e68bc3a8546e44f9f8515bf0 Mon Sep 17 00:00:00 2001 From: ludeeus Date: Sat, 9 Mar 2019 12:36:53 +0100 Subject: [PATCH] Remove switch --- README.md | 15 --------------- custom_components/blueprint/__init__.py | 10 ++-------- custom_components/blueprint/const.py | 2 -- 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 231fc09..6e23d9a 100644 --- a/README.md +++ b/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 diff --git a/custom_components/blueprint/__init__.py b/custom_components/blueprint/__init__.py index 0077598..192c0cd 100644 --- a/custom_components/blueprint/__init__.py +++ b/custom_components/blueprint/__init__.py @@ -14,8 +14,8 @@ 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 @@ 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) diff --git a/custom_components/blueprint/const.py b/custom_components/blueprint/const.py index 149a3be..aea635b 100644 --- a/custom_components/blueprint/const.py +++ b/custom_components/blueprint/const.py @@ -29,10 +29,8 @@ # Configuration CONF_BINARY_SENSOR = 'binary_sensor' CONF_SENSOR = 'sensor' -CONF_SWITCH = 'switch' CONF_ENABLED = 'enabled' CONF_NAME = 'name' - # Defaults DEAFULT_NAME = DOMAIN