Mark entity abc (#28869)
* Mark entity abc * Use abstractmethod in climate * Lint
This commit is contained in:
parent
21157f9dac
commit
94675ca5a7
5 changed files with 60 additions and 10 deletions
|
@ -1,4 +1,5 @@
|
|||
"""Provides functionality to interact with climate devices."""
|
||||
from abc import abstractmethod
|
||||
from datetime import timedelta
|
||||
import functools as ft
|
||||
import logging
|
||||
|
@ -270,20 +271,20 @@ class ClimateDevice(Entity):
|
|||
return None
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def hvac_mode(self) -> str:
|
||||
"""Return hvac operation ie. heat, cool mode.
|
||||
|
||||
Need to be one of HVAC_MODE_*.
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def hvac_modes(self) -> List[str]:
|
||||
"""Return the list of available hvac operation modes.
|
||||
|
||||
Need to be a subset of HVAC_MODES.
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
@property
|
||||
def hvac_action(self) -> Optional[str]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue