core/homeassistant/components/smart_meter_texas/const.py

16 lines
392 B
Python
Raw Normal View History

Smart Meter Texas integration (#37966) * Run scaffold script * Update version * Bump version * Initial commit * Move meter and ESIID to device attributes * Update internal to hourly due to api limit * Format with Black * Fix typo * Update tests * Update description * Disable Pylint error * Don't commit translations * Remove meter number from sensor name * Allow multiple meters per account * Move data updates to a DataUpdateCoordinator * Use setdefault to setup the component * Move strings to const.py * Fix tests * Remove meter last updated attribute * Bump smart-meter-texas version * Fix logger call Co-authored-by: J. Nick Koston <nick@koston.org> * Remove unneeded manifest keys Co-authored-by: J. Nick Koston <nick@koston.org> * Remove icon property Co-authored-by: J. Nick Koston <nick@koston.org> * Handle instance where user already setup an account Co-authored-by: J. Nick Koston <nick@koston.org> * Remove icon constant * Fix indentation * Handle config flow errors better * Use ESIID + meter number as unique ID for sensor * Update config flow tests to reach 100% coverage * Avoid reading meters on startup Cherrypick @bdraco's suggestion * Run scaffold script * Update version * Bump version * Initial commit * Move meter and ESIID to device attributes * Update internal to hourly due to api limit * Format with Black * Fix typo * Update tests * Update description * Disable Pylint error * Don't commit translations * Remove meter number from sensor name * Allow multiple meters per account * Move data updates to a DataUpdateCoordinator * Use setdefault to setup the component * Move strings to const.py * Fix tests * Remove meter last updated attribute * Bump smart-meter-texas version * Fix logger call Co-authored-by: J. Nick Koston <nick@koston.org> * Remove unneeded manifest keys Co-authored-by: J. Nick Koston <nick@koston.org> * Remove icon property Co-authored-by: J. Nick Koston <nick@koston.org> * Handle instance where user already setup an account Co-authored-by: J. Nick Koston <nick@koston.org> * Remove icon constant * Fix indentation * Handle config flow errors better * Use ESIID + meter number as unique ID for sensor * Update config flow tests to reach 100% coverage * Remove unnecessary try/except block This checks for the same exception just prior in execution on L51. * Remove unused return values * Add tests * Improve tests and coverage * Use more pythonic control flow * Remove all uses of hass.data Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-19 18:16:45 +00:00
"""Constants for the Smart Meter Texas integration."""
from datetime import timedelta
SCAN_INTERVAL = timedelta(hours=1)
DEBOUNCE_COOLDOWN = 1800 # Seconds
DATA_COORDINATOR = "coordinator"
DATA_SMART_METER = "smart_meter_data"
DOMAIN = "smart_meter_texas"
METER_NUMBER = "meter_number"
ESIID = "electric_service_identifier"
LAST_UPDATE = "last_updated"
ELECTRIC_METER = "Electric Meter"