Mark entity abc (#28869)

* Mark entity abc

* Use abstractmethod in climate

* Lint
This commit is contained in:
Paulus Schoutsen 2019-11-19 13:42:09 -06:00 committed by GitHub
parent 21157f9dac
commit 94675ca5a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 60 additions and 10 deletions

View file

@ -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]: