2021-05-16 10:07:48 -06: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
|
2021-05-16 10:07:48 -06:00
|
|
|
|
|
|
|
from .base import ApplianceApi
|
2021-06-09 11:49:27 -06:00
|
|
|
from ..entities import GeErdSensor, GeErdBinarySensor
|
2021-05-16 10:07:48 -06:00
|
|
|
|
|
|
|
_LOGGER = logging.getLogger(__name__)
|
|
|
|
|
|
|
|
|
|
|
|
class DryerApi(ApplianceApi):
|
|
|
|
"""API class for dryer objects"""
|
2021-05-18 12:13:29 -06:00
|
|
|
APPLIANCE_TYPE = ErdApplianceType.DRYER
|
2021-05-16 10:07:48 -06:00
|
|
|
|
|
|
|
def get_all_entities(self) -> List[Entity]:
|
|
|
|
base_entities = super().get_all_entities()
|
|
|
|
|
|
|
|
dryer_entities = [
|
2021-05-18 12:13:29 -06:00
|
|
|
GeErdSensor(self, ErdCode.LAUNDRY_MACHINE_STATE),
|
|
|
|
GeErdSensor(self, ErdCode.LAUNDRY_MACHINE_SUBCYCLE),
|
|
|
|
GeErdBinarySensor(self, ErdCode.LAUNDRY_END_OF_CYCLE),
|
|
|
|
GeErdSensor(self, ErdCode.LAUNDRY_TIME_REMAINING),
|
|
|
|
GeErdSensor(self, ErdCode.LAUNDRY_CYCLE),
|
|
|
|
GeErdSensor(self, ErdCode.LAUNDRY_DELAY_TIME_REMAINING),
|
|
|
|
GeErdSensor(self, ErdCode.LAUNDRY_DOOR),
|
|
|
|
GeErdSensor(self, ErdCode.LAUNDRY_DRYNESSNEW_LEVEL),
|
|
|
|
GeErdSensor(self, ErdCode.LAUNDRY_TEMPERATURENEW_OPTION),
|
|
|
|
GeErdBinarySensor(self, ErdCode.LAUNDRY_REMOTE_STATUS)
|
2021-05-16 10:07:48 -06:00
|
|
|
|
|
|
|
]
|
|
|
|
entities = base_entities + dryer_entities
|
|
|
|
return entities
|
2021-05-18 12:13:29 -06:00
|
|
|
|