Add vicare one-time charge (#64376)

* vicare: Add OneTime Charge

* Integrate review comments

* Simplify button entity
This commit is contained in:
Hans Oischinger 2022-01-23 18:27:19 +01:00 committed by GitHub
parent 94a89d520b
commit c23b2135a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 123 additions and 0 deletions

View file

@ -34,6 +34,7 @@ _LOGGER = logging.getLogger(__name__)
SENSOR_CIRCULATION_PUMP_ACTIVE = "circulationpump_active"
SENSOR_BURNER_ACTIVE = "burner_active"
SENSOR_CHARGING_ACTIVE = "charging_active"
SENSOR_COMPRESSOR_ACTIVE = "compressor_active"
SENSOR_SOLAR_PUMP_ACTIVE = "solar_pump_active"
@ -79,6 +80,12 @@ GLOBAL_SENSORS: tuple[ViCareBinarySensorEntityDescription, ...] = (
device_class=BinarySensorDeviceClass.POWER,
value_getter=lambda api: api.getSolarPumpActive(),
),
ViCareBinarySensorEntityDescription(
key=SENSOR_CHARGING_ACTIVE,
name="Domestic Hot Water Charging active",
device_class=BinarySensorDeviceClass.RUNNING,
value_getter=lambda api: api.getDomesticHotWaterChargingActive(),
),
)