Update plugwise to async and config_flow sensor part (#36219)

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Tom 2020-06-01 14:01:17 +02:00 committed by GitHub
parent 5d7720832b
commit d0fedad000
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 439 additions and 83 deletions

View file

@ -1,6 +1,11 @@
"""Constant for Plugwise component."""
DOMAIN = "plugwise"
# Sensor mapping
SENSOR_MAP_MODEL = 0
SENSOR_MAP_UOM = 1
SENSOR_MAP_DEVICE_CLASS = 2
# Default directives
DEFAULT_NAME = "Smile"
DEFAULT_USERNAME = "smile"
@ -10,8 +15,6 @@ DEFAULT_MIN_TEMP = 4
DEFAULT_MAX_TEMP = 30
DEFAULT_SCAN_INTERVAL = {"thermostat": 60, "power": 10}
DEVICE_CLASS_GAS = "gas"
# Configuration directives
CONF_MIN_TEMP = "min_temp"
CONF_MAX_TEMP = "max_temp"
@ -22,21 +25,15 @@ CONF_SOLAR = "solar"
CONF_GAS = "gas"
ATTR_ILLUMINANCE = "illuminance"
UNIT_LUMEN = "lm"
CURRENT_HVAC_DHW = "hot_water"
DEVICE_STATE = "device_state"
SCHEDULE_ON = "true"
SCHEDULE_OFF = "false"
# Icons
SWITCH_ICON = "mdi:electric-switch"
THERMOSTAT_ICON = "mdi:thermometer"
WATER_ICON = "mdi:water-pump"
FLAME_ICON = "mdi:fire"
COOL_ICON = "mdi:snowflake"
FLAME_ICON = "mdi:fire"
IDLE_ICON = "mdi:circle-off-outline"
GAS_ICON = "mdi:fire"
POWER_ICON = "mdi:flash"
POWER_FAILURE_ICON = "mdi:flash-off"
SWELL_SAG_ICON = "mdi:pulse"
VALVE_ICON = "mdi:valve"