1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-10 15:22:24 +01:00

Generic Switch inversion support fixes #14

This commit is contained in:
Otto Winter
2018-05-17 17:20:43 +02:00
parent ebb5991889
commit 3a9febaf85
6 changed files with 22 additions and 12 deletions

View File

@@ -1,10 +1,13 @@
import voluptuous as vol
import esphomeyaml.config_validation as cv
from esphomeyaml.components import switch
from esphomeyaml.const import CONF_ID, CONF_NAME
from esphomeyaml.const import CONF_ID, CONF_NAME, CONF_INVERTED
from esphomeyaml.helpers import App, variable
PLATFORM_SCHEMA = switch.PLATFORM_SCHEMA.extend({
cv.GenerateID('shutdown_switch'): cv.register_variable_id,
vol.Optional(CONF_INVERTED): cv.invalid("Shutdown switches do not support inverted mode!"),
}).extend(switch.MQTT_SWITCH_SCHEMA.schema)