* Init integration P1 Monitor * Fix build error * Add quality scale * Remove last_reset and icon * Change list to tuple * Close client on connection exception * Change min value to 5 (seconds) * the used python package will close it * Remove the options flow * Add session and close client * Smash to a single DataUpdateCoordinator * Make a custom update coordinator class * await the coordinator close * Add second await the coordinator close * Close when exit scope * Removed unused code * Fix test_sensor on entity_id change * Fix test on test_sensor * Transfer SENSOR dict to sensor platform * device class for cost entity update entity_name * Revert name in unique id and update sensor test * Update code based on suggestions * Fix typing * Change code to fix mypy errors Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
23 lines
585 B
Python
23 lines
585 B
Python
"""Constants for the P1 Monitor integration."""
|
|
from __future__ import annotations
|
|
|
|
from datetime import timedelta
|
|
import logging
|
|
from typing import Final
|
|
|
|
DOMAIN: Final = "p1_monitor"
|
|
LOGGER = logging.getLogger(__package__)
|
|
SCAN_INTERVAL = timedelta(seconds=5)
|
|
|
|
ATTR_ENTRY_TYPE: Final = "entry_type"
|
|
ENTRY_TYPE_SERVICE: Final = "service"
|
|
|
|
SERVICE_SMARTMETER: Final = "smartmeter"
|
|
SERVICE_PHASES: Final = "phases"
|
|
SERVICE_SETTINGS: Final = "settings"
|
|
|
|
SERVICES: dict[str, str] = {
|
|
SERVICE_SMARTMETER: "SmartMeter",
|
|
SERVICE_PHASES: "Phases",
|
|
SERVICE_SETTINGS: "Settings",
|
|
}
|