2020-12-28 15:46:15 -07:00
|
|
|
import logging
|
|
|
|
from typing import List
|
|
|
|
|
|
|
|
from homeassistant.helpers.entity import Entity
|
2020-12-29 15:01:29 -07:00
|
|
|
from gekitchensdk.erd import ErdCode, ErdApplianceType
|
2020-12-28 15:46:15 -07:00
|
|
|
|
|
|
|
from .base import ApplianceApi
|
2020-12-29 12:40:34 -07:00
|
|
|
from ..entities import GeErdSensor, GeDishwasherControlLockedSwitch
|
2020-12-28 15:46:15 -07:00
|
|
|
|
|
|
|
_LOGGER = logging.getLogger(__name__)
|
|
|
|
|
|
|
|
|
|
|
|
class DishwasherApi(ApplianceApi):
|
|
|
|
"""API class for oven objects"""
|
|
|
|
APPLIANCE_TYPE = ErdApplianceType.DISH_WASHER
|
|
|
|
|
|
|
|
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),
|
|
|
|
GeErdSensor(self, ErdCode.DISHWASHER_PODS_REMAINING_VALUE),
|
|
|
|
GeErdSensor(self, ErdCode.DISHWASHER_RINSE_AGENT, icon_override="mdi:sparkles"),
|
|
|
|
GeErdSensor(self, ErdCode.DISHWASHER_TIME_REMAINING),
|
2020-12-28 15:46:15 -07:00
|
|
|
]
|
|
|
|
entities = base_entities + dishwasher_entities
|
|
|
|
return entities
|
|
|
|
|