add http support

This commit is contained in:
Andrey
2021-01-25 12:25:11 +03:00
parent 876a1f0cc8
commit 8bbb4ab271
13 changed files with 361 additions and 119 deletions

View File

@@ -1,4 +1,5 @@
"""Constants for the mega integration."""
import re
DOMAIN = "mega"
CONF_MEGA_ID = "mega_id"
@@ -14,11 +15,19 @@ CONF_RELOAD = 'reload'
CONF_INVERT = 'invert'
CONF_PORTS = 'ports'
CONF_CUSTOM = '__custom'
CONF_HTTP = '__http'
CONF_SKIP = 'skip'
CONF_MQTT_INPUTS = 'mqtt_inputs'
CONF_NPORTS = 'nports'
CONF_RESPONSE_TEMPLATE = 'response_template'
CONF_ACTION = 'action'
CONF_UPDATE_ALL = 'update_all'
CONF_GET_VALUE = 'get_value'
PLATFORMS = [
"light",
"switch",
"binary_sensor",
"sensor",
]
EVENT_BINARY_SENSOR = f'{DOMAIN}.sensor'
EVENT_BINARY_SENSOR = f'{DOMAIN}.sensor'
PATT_SPLIT = re.compile('[;/]')