mirror of
https://github.com/home-assistant/core.git
synced 2025-05-12 18:09:17 +00:00

* Add component VersaSense * Updates based on review * Changes based on review * Fixed whitespace * Fixed lines too long * Fixed lines too long * Formatted using black * Added available property * Set unavailable property appropriately * Conversion to f-strings * Load platform only once per platform * Fixed duplicate identifiers across multiple devices * Single call to async_add_entities during setup * Removed unnecessary async/await syntax * Added constants for key-value pairs * Removed async/await syntax * Added breaks in measurement check * Added guard clause for discovery_info
12 lines
344 B
Python
12 lines
344 B
Python
"""Constants for versasense."""
|
|
KEY_CONSUMER = "consumer"
|
|
KEY_IDENTIFIER = "identifier"
|
|
KEY_MEASUREMENT = "measurement"
|
|
KEY_PARENT_MAC = "parent_mac"
|
|
KEY_PARENT_NAME = "parent_name"
|
|
KEY_UNIT = "unit"
|
|
PERIPHERAL_CLASS_SENSOR = "sensor"
|
|
PERIPHERAL_CLASS_SENSOR_ACTUATOR = "sensor-actuator"
|
|
PERIPHERAL_STATE_OFF = "OFF"
|
|
PERIPHERAL_STATE_ON = "ON"
|