2020-12-28 15:46:15 -07:00
|
|
|
import logging
|
|
|
|
from typing import List
|
|
|
|
|
|
|
|
from homeassistant.helpers.entity import Entity
|
2021-05-20 09:15:49 -06:00
|
|
|
from gehomesdk.erd import ErdCode, ErdApplianceType
|
2020-12-28 15:46:15 -07:00
|
|
|
|
|
|
|
from .base import ApplianceApi
|
2021-07-08 16:11:10 -06:00
|
|
|
from ..entities import GeErdSensor, GeErdBinarySensor, GeErdPropertySensor
|
2020-12-28 15:46:15 -07:00
|
|
|
|
|
|
|
_LOGGER = logging.getLogger(__name__)
|
|
|
|
|
|
|
|
|
|
|
|
class DishwasherApi(ApplianceApi):
|
2021-05-16 10:07:48 -06:00
|
|
|
"""API class for dishwasher objects"""
|
2021-07-08 09:50:41 -06:00
|
|
|
APPLIANCE_TYPE = ErdApplianceType.DISH_WASHER
|
2020-12-28 15:46:15 -07:00
|
|
|
|
|
|
|
def get_all_entities(self) -> List[Entity]:
|
|
|
|
base_entities = super().get_all_entities()
|
|
|
|
|
|
|
|
dishwasher_entities = [
|
2020-12-29 20:21:28 -07:00
|
|
|
#GeDishwasherControlLockedSwitch(self, ErdCode.USER_INTERFACE_LOCKED),
|
2021-01-10 20:56:04 -07:00
|
|
|
GeErdSensor(self, ErdCode.DISHWASHER_CYCLE_NAME),
|
|
|
|
GeErdSensor(self, ErdCode.DISHWASHER_CYCLE_STATE),
|
|
|
|
GeErdSensor(self, ErdCode.DISHWASHER_OPERATING_MODE),
|
2021-07-22 20:46:38 -06:00
|
|
|
GeErdSensor(self, ErdCode.DISHWASHER_PODS_REMAINING_VALUE, uom_override="pods"),
|
2021-01-10 20:56:04 -07:00
|
|
|
GeErdSensor(self, ErdCode.DISHWASHER_RINSE_AGENT, icon_override="mdi:sparkles"),
|
|
|
|
GeErdSensor(self, ErdCode.DISHWASHER_TIME_REMAINING),
|
2021-07-08 09:50:41 -06:00
|
|
|
GeErdBinarySensor(self, ErdCode.DISHWASHER_DOOR_STATUS),
|
|
|
|
|
|
|
|
#User Setttings
|
2021-07-08 16:11:10 -06:00
|
|
|
GeErdPropertySensor(self, ErdCode.DISHWASHER_USER_SETTING, "sound", icon_override="mdi:volume-high"),
|
|
|
|
GeErdPropertySensor(self, ErdCode.DISHWASHER_USER_SETTING, "lock_control", icon_override="mdi:lock"),
|
2021-07-24 10:30:13 -06:00
|
|
|
GeErdPropertySensor(self, ErdCode.DISHWASHER_USER_SETTING, "sabbath", icon_override="mdi:judaism"),
|
2021-07-22 20:46:38 -06:00
|
|
|
GeErdPropertySensor(self, ErdCode.DISHWASHER_USER_SETTING, "cycle_mode", icon_override="mdi:state-machine"),
|
2021-07-08 09:50:41 -06:00
|
|
|
GeErdPropertySensor(self, ErdCode.DISHWASHER_USER_SETTING, "presoak"),
|
|
|
|
GeErdPropertySensor(self, ErdCode.DISHWASHER_USER_SETTING, "bottle_jet"),
|
2021-07-08 16:11:10 -06:00
|
|
|
GeErdPropertySensor(self, ErdCode.DISHWASHER_USER_SETTING, "wash_temp", icon_override="mdi:coolant-temperature"),
|
2021-07-08 09:50:41 -06:00
|
|
|
GeErdPropertySensor(self, ErdCode.DISHWASHER_USER_SETTING, "dry_option"),
|
|
|
|
GeErdPropertySensor(self, ErdCode.DISHWASHER_USER_SETTING, "wash_zone"),
|
2021-07-08 16:11:10 -06:00
|
|
|
GeErdPropertySensor(self, ErdCode.DISHWASHER_USER_SETTING, "delay_hours", icon_override="mdi:clock-fast")
|
2020-12-28 15:46:15 -07:00
|
|
|
]
|
|
|
|
entities = base_entities + dishwasher_entities
|
|
|
|
return entities
|
2021-05-20 09:15:49 -06:00
|
|
|
|