Add support for DHT and DS18B20 sensors via Konnected firmware (#21189)
* mvp basic temperature sensor support * support for DHT temperature & humidity * add support for ds18b20 sensors * improve resolution of device settings * update requirements_all.txt * re-organize new file * don't use filter(lambda: syntax * set unique_id on entities to allow renaming in the UI * leverage base Entity module to do C to F conversion * add option for setting poll_interval * use handler pattern to handle updates from Konnected device * cleanups from code review
This commit is contained in:
parent
158e25562b
commit
f62eb22ef8
7 changed files with 358 additions and 108 deletions
27
homeassistant/components/konnected/const.py
Normal file
27
homeassistant/components/konnected/const.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
"""Konnected constants."""
|
||||
|
||||
DOMAIN = 'konnected'
|
||||
|
||||
CONF_ACTIVATION = 'activation'
|
||||
CONF_API_HOST = 'api_host'
|
||||
CONF_MOMENTARY = 'momentary'
|
||||
CONF_PAUSE = 'pause'
|
||||
CONF_POLL_INTERVAL = 'poll_interval'
|
||||
CONF_PRECISION = 'precision'
|
||||
CONF_REPEAT = 'repeat'
|
||||
CONF_INVERSE = 'inverse'
|
||||
CONF_BLINK = 'blink'
|
||||
CONF_DISCOVERY = 'discovery'
|
||||
CONF_DHT_SENSORS = 'dht_sensors'
|
||||
CONF_DS18B20_SENSORS = 'ds18b20_sensors'
|
||||
|
||||
STATE_LOW = 'low'
|
||||
STATE_HIGH = 'high'
|
||||
|
||||
PIN_TO_ZONE = {1: 1, 2: 2, 5: 3, 6: 4, 7: 5, 8: 'out', 9: 6}
|
||||
ZONE_TO_PIN = {zone: pin for pin, zone in PIN_TO_ZONE.items()}
|
||||
|
||||
ENDPOINT_ROOT = '/api/konnected'
|
||||
UPDATE_ENDPOINT = (ENDPOINT_ROOT + r'/device/{device_id:[a-zA-Z0-9]+}')
|
||||
SIGNAL_SENSOR_UPDATE = 'konnected.{}.update'
|
||||
SIGNAL_DS18B20_NEW = 'konnected.ds18b20.new'
|
Loading…
Add table
Add a link
Reference in a new issue