Skip to content

Commit

Permalink
Update device class, icons and names of Vicare binary sensors (#101476)
Browse files Browse the repository at this point in the history
Co-authored-by: Joost Lekkerkerker <[email protected]>
  • Loading branch information
CFenner and joostlek authored Oct 16, 2023
1 parent eaf6197 commit b8904fa
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions homeassistant/components/vicare/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,59 +38,64 @@ class ViCareBinarySensorEntityDescription(
CIRCUIT_SENSORS: tuple[ViCareBinarySensorEntityDescription, ...] = (
ViCareBinarySensorEntityDescription(
key="circulationpump_active",
name="Circulation pump active",
device_class=BinarySensorDeviceClass.POWER,
name="Circulation pump",
icon="mdi:pump",
device_class=BinarySensorDeviceClass.RUNNING,
value_getter=lambda api: api.getCirculationPumpActive(),
),
ViCareBinarySensorEntityDescription(
key="frost_protection_active",
name="Frost protection active",
device_class=BinarySensorDeviceClass.POWER,
name="Frost protection",
icon="mdi:snowflake",
value_getter=lambda api: api.getFrostProtectionActive(),
),
)

BURNER_SENSORS: tuple[ViCareBinarySensorEntityDescription, ...] = (
ViCareBinarySensorEntityDescription(
key="burner_active",
name="Burner active",
device_class=BinarySensorDeviceClass.POWER,
name="Burner",
icon="mdi:gas-burner",
device_class=BinarySensorDeviceClass.RUNNING,
value_getter=lambda api: api.getActive(),
),
)

COMPRESSOR_SENSORS: tuple[ViCareBinarySensorEntityDescription, ...] = (
ViCareBinarySensorEntityDescription(
key="compressor_active",
name="Compressor active",
device_class=BinarySensorDeviceClass.POWER,
name="Compressor",
device_class=BinarySensorDeviceClass.RUNNING,
value_getter=lambda api: api.getActive(),
),
)

GLOBAL_SENSORS: tuple[ViCareBinarySensorEntityDescription, ...] = (
ViCareBinarySensorEntityDescription(
key="solar_pump_active",
name="Solar pump active",
device_class=BinarySensorDeviceClass.POWER,
name="Solar pump",
icon="mdi:pump",
device_class=BinarySensorDeviceClass.RUNNING,
value_getter=lambda api: api.getSolarPumpActive(),
),
ViCareBinarySensorEntityDescription(
key="charging_active",
name="DHW Charging active",
name="DHW Charging",
device_class=BinarySensorDeviceClass.RUNNING,
value_getter=lambda api: api.getDomesticHotWaterChargingActive(),
),
ViCareBinarySensorEntityDescription(
key="dhw_circulationpump_active",
name="DHW Circulation Pump Active",
device_class=BinarySensorDeviceClass.POWER,
name="DHW Circulation Pump",
icon="mdi:pump",
device_class=BinarySensorDeviceClass.RUNNING,
value_getter=lambda api: api.getDomesticHotWaterCirculationPumpActive(),
),
ViCareBinarySensorEntityDescription(
key="dhw_pump_active",
name="DHW Pump Active",
device_class=BinarySensorDeviceClass.POWER,
name="DHW Pump",
icon="mdi:pump",
device_class=BinarySensorDeviceClass.RUNNING,
value_getter=lambda api: api.getDomesticHotWaterPumpActive(),
),
)
Expand Down

0 comments on commit b8904fa

Please sign in to comment.