mirror of
https://github.com/home-assistant/core.git
synced 2026-09-30 07:53:50 +01:00
* add sensors for vitocharge * add further sensors * add unig getters * remove icons * Update strings.json * handle percent uom * handle unknown uom device class mapping * add device class to sensor * add sensor options * Apply suggestions from code review * fix * align sensor naming * add feed-in and consumption sensors for pcc * Update strings.json * battery symbol * fix format * remove obsolete device classes * add icons * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * refactor * modify lambda * use helper * Apply suggestions from code review * Apply suggestions from code review * Update strings.json * Update sensor.py * Apply suggestions from code review Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
56 lines
1.1 KiB
Python
56 lines
1.1 KiB
Python
"""Constants for the ViCare integration."""
|
|
import enum
|
|
|
|
from homeassistant.const import Platform
|
|
|
|
DOMAIN = "vicare"
|
|
|
|
PLATFORMS = [
|
|
Platform.BINARY_SENSOR,
|
|
Platform.BUTTON,
|
|
Platform.CLIMATE,
|
|
Platform.NUMBER,
|
|
Platform.SENSOR,
|
|
Platform.WATER_HEATER,
|
|
]
|
|
|
|
DEVICE_LIST = "device_list"
|
|
VICARE_NAME = "ViCare"
|
|
|
|
CONF_CIRCUIT = "circuit"
|
|
CONF_HEATING_TYPE = "heating_type"
|
|
|
|
DEFAULT_CACHE_DURATION = 60
|
|
|
|
VICARE_PERCENT = "percent"
|
|
VICARE_W = "watt"
|
|
VICARE_KW = "kilowatt"
|
|
VICARE_WH = "wattHour"
|
|
VICARE_KWH = "kilowattHour"
|
|
VICARE_CUBIC_METER = "cubicMeter"
|
|
|
|
|
|
class HeatingType(enum.Enum):
|
|
"""Possible options for heating type."""
|
|
|
|
auto = "auto"
|
|
gas = "gas"
|
|
oil = "oil"
|
|
pellets = "pellets"
|
|
heatpump = "heatpump"
|
|
fuelcell = "fuelcell"
|
|
hybrid = "hybrid"
|
|
|
|
|
|
DEFAULT_HEATING_TYPE = HeatingType.auto
|
|
|
|
HEATING_TYPE_TO_CREATOR_METHOD = {
|
|
HeatingType.auto: "asAutoDetectDevice",
|
|
HeatingType.gas: "asGazBoiler",
|
|
HeatingType.fuelcell: "asFuelCell",
|
|
HeatingType.heatpump: "asHeatPump",
|
|
HeatingType.oil: "asOilBoiler",
|
|
HeatingType.pellets: "asPelletsBoiler",
|
|
HeatingType.hybrid: "asHybridDevice",
|
|
}
|