2020-12-17 19:20:43 -07:00
|
|
|
"""GE Kitchen Sensor Entities - Freezer"""
|
|
|
|
import logging
|
2020-12-28 16:36:38 -07:00
|
|
|
from typing import Any, Dict, Optional
|
2020-12-17 19:20:43 -07:00
|
|
|
|
|
|
|
from gekitchen import (
|
|
|
|
ErdCode,
|
|
|
|
ErdDoorStatus
|
|
|
|
)
|
|
|
|
|
2020-12-28 16:36:38 -07:00
|
|
|
from .ge_abstract_fridge import (
|
2020-12-17 19:20:43 -07:00
|
|
|
ATTR_DOOR_STATUS,
|
|
|
|
HEATER_TYPE_FREEZER,
|
|
|
|
OP_MODE_TURBO_FREEZE,
|
2020-12-28 16:36:38 -07:00
|
|
|
GeAbstractFridge
|
2020-12-17 19:20:43 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
_LOGGER = logging.getLogger(__name__)
|
|
|
|
|
2020-12-28 16:36:38 -07:00
|
|
|
class GeFreezer(GeAbstractFridge):
|
2020-12-17 19:20:43 -07:00
|
|
|
"""A freezer is basically a fridge."""
|
|
|
|
|
|
|
|
heater_type = HEATER_TYPE_FREEZER
|
|
|
|
turbo_erd_code = ErdCode.TURBO_FREEZE_STATUS
|
|
|
|
turbo_mode = OP_MODE_TURBO_FREEZE
|
|
|
|
icon = "mdi:fridge-top"
|
|
|
|
|
|
|
|
@property
|
|
|
|
def door_state_attrs(self) -> Optional[Dict[str, Any]]:
|
|
|
|
door_status = self.door_status.freezer
|
|
|
|
if door_status and door_status != ErdDoorStatus.NA:
|
|
|
|
return {ATTR_DOOR_STATUS: door_status.name.title()}
|
|
|
|
return {}
|