Add surepetcare component (#24426)
* add surepetcare * cleanup * remove unused imports and comments * remove comment * fix bug which prevented updating the sensors * improve config validation * fix voluptuous usage * fix format & credential storage * various fixes to hass-conform * small format fixes * change False to None * still trying to be hass-conform * remove unused class * fix imports * fix f-string * add guard clause?! * central data fetch * do not pass in hass, will be provided automatically * make the linters happy * disable constant-test warning and add commas * worksforme * fix link in manifest * remove icon * bump surepy to 0.1.5 * worksforme * small doc fixes * add discovery_info guard * result of another awesome review * and again :) * exclude surepetcare in .coveragerc
This commit is contained in:
parent
0971c681af
commit
1fffa210e1
8 changed files with 513 additions and 0 deletions
27
homeassistant/components/surepetcare/const.py
Normal file
27
homeassistant/components/surepetcare/const.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
"""Constants for the Sure Petcare component."""
|
||||
from datetime import timedelta
|
||||
|
||||
DOMAIN = "surepetcare"
|
||||
DEFAULT_DEVICE_CLASS = "lock"
|
||||
DEFAULT_ICON = "mdi:cat"
|
||||
DEFAULT_SCAN_INTERVAL = timedelta(minutes=3)
|
||||
|
||||
DATA_SURE_PETCARE = f"data_{DOMAIN}"
|
||||
SPC = "spc"
|
||||
SUREPY = "surepy"
|
||||
|
||||
CONF_HOUSEHOLD_ID = "household_id"
|
||||
CONF_FLAPS = "flaps"
|
||||
CONF_PETS = "pets"
|
||||
CONF_DATA = "data"
|
||||
|
||||
SURE_IDS = "sure_ids"
|
||||
|
||||
# platforms
|
||||
TOPIC_UPDATE = f"{DOMAIN}_data_update"
|
||||
|
||||
# flap
|
||||
BATTERY_ICON = "mdi:battery"
|
||||
SURE_BATT_VOLTAGE_FULL = 1.6 # voltage
|
||||
SURE_BATT_VOLTAGE_LOW = 1.25 # voltage
|
||||
SURE_BATT_VOLTAGE_DIFF = SURE_BATT_VOLTAGE_FULL - SURE_BATT_VOLTAGE_LOW
|
Loading…
Add table
Add a link
Reference in a new issue