* Add Integration for Goal Zero Yeti Power Stations * Goal Zero Yeti integration with config flow * Remove unused entities * Remove entry from requirements_test_all * Pylint fix * Apply suggestions from code review Co-authored-by: Franck Nijhof <frenck@frenck.nl> * Add tests for goalzero integration * Fix UNIT_PERCENTAGE to PERCENTAGE * isort PERCENTAGE * Add tests * Add en translation * Fix tests * bump goalzero to 0.1.1 * fix await * bump goalzero to 0.1.2 * Update tests/components/goalzero/__init__.py Co-authored-by: J. Nick Koston <nick@koston.org> * apply recommended changes * isort * bump goalzero to 0.1.4 * apply recommended changes * apply recommended changes Co-authored-by: Franck Nijhof <frenck@frenck.nl> Co-authored-by: J. Nick Koston <nick@koston.org>
28 lines
834 B
Python
28 lines
834 B
Python
"""Constants for the Goal Zero Yeti integration."""
|
|
from datetime import timedelta
|
|
|
|
from homeassistant.components.binary_sensor import (
|
|
DEVICE_CLASS_BATTERY_CHARGING,
|
|
DEVICE_CLASS_CONNECTIVITY,
|
|
DEVICE_CLASS_POWER,
|
|
)
|
|
|
|
DATA_KEY_COORDINATOR = "coordinator"
|
|
DOMAIN = "goalzero"
|
|
DEFAULT_NAME = "Yeti"
|
|
DATA_KEY_API = "api"
|
|
|
|
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=30)
|
|
|
|
BINARY_SENSOR_DICT = {
|
|
"v12PortStatus": ["12V Port Status", DEVICE_CLASS_POWER, None],
|
|
"usbPortStatus": ["USB Port Status", DEVICE_CLASS_POWER, None],
|
|
"acPortStatus": ["AC Port Status", DEVICE_CLASS_POWER, None],
|
|
"backlight": ["Backlight", None, "mdi:clock-digital"],
|
|
"app_online": [
|
|
"App Online",
|
|
DEVICE_CLASS_CONNECTIVITY,
|
|
None,
|
|
],
|
|
"isCharging": ["Charging", DEVICE_CLASS_BATTERY_CHARGING, None],
|
|
}
|