hass-core/homeassistant/components/plugwise/const.py
Tom ed36cb7beb
Add notification binary_sensor to Plugwise integration (#41473)
* Notifications extract from beta

* Remove info loggings

* Delete notification service

* Only notifications for right smiles

* Revert to correct logic

* Catchup with dev (mostly with ourselves from #41201)

* Remove debug logging

* Naming improvement

* Improve test quality as per codecov patch requirement

* Revert to original condition (and appropriately test)

* Fix delete_notification_service, bring tests fixtures up to 1.6.0 including notifications

* Review comment (@bouwew)

* Correct test value

* Re-apply #40108 fix after rebase sidestep

* Update tests/components/plugwise/test_init.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Add needed state to imports

* Remove separate gw unload code

* Change entry_fail approach

* Revert persistent notification part

* Revert persistent notification part - lint

* Update homeassistant/components/plugwise/binary_sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/plugwise/binary_sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Rework reuse of sensor in binary_sensor

* Explicit state attribute keys

* Remove tempfile

* List of notifications per severity

* Update homeassistant/components/plugwise/binary_sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-11-16 19:54:44 -06:00

55 lines
1.2 KiB
Python

"""Constant for Plugwise component."""
DOMAIN = "plugwise"
SENSOR_PLATFORMS = ["sensor", "switch"]
ALL_PLATFORMS = ["binary_sensor", "climate", "sensor", "switch"]
# Sensor mapping
SENSOR_MAP_DEVICE_CLASS = 2
SENSOR_MAP_ICON = 3
SENSOR_MAP_MODEL = 0
SENSOR_MAP_UOM = 1
# Default directives
DEFAULT_MIN_TEMP = 4
DEFAULT_MAX_TEMP = 30
DEFAULT_NAME = "Smile"
DEFAULT_PORT = 80
DEFAULT_USERNAME = "smile"
DEFAULT_SCAN_INTERVAL = {"power": 10, "stretch": 60, "thermostat": 60}
DEFAULT_TIMEOUT = 60
# Configuration directives
CONF_BASE = "base"
CONF_GAS = "gas"
CONF_MAX_TEMP = "max_temp"
CONF_MIN_TEMP = "min_temp"
CONF_POWER = "power"
CONF_THERMOSTAT = "thermostat"
ATTR_ILLUMINANCE = "illuminance"
UNIT_LUMEN = "lm"
DEVICE_STATE = "device_state"
SCHEDULE_OFF = "false"
SCHEDULE_ON = "true"
COOL_ICON = "mdi:snowflake"
FLAME_ICON = "mdi:fire"
FLOW_OFF_ICON = "mdi:water-pump-off"
FLOW_ON_ICON = "mdi:water-pump"
IDLE_ICON = "mdi:circle-off-outline"
SWITCH_ICON = "mdi:electric-switch"
NO_NOTIFICATION_ICON = "mdi:mailbox-outline"
NOTIFICATION_ICON = "mdi:mailbox-up-outline"
COORDINATOR = "coordinator"
UNDO_UPDATE_LISTENER = "undo_update_listener"
ZEROCONF_MAP = {
"smile": "P1",
"smile_thermo": "Anna",
"smile_open_therm": "Adam",
"stretch": "Stretch",
}