1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

ABC consistent not implemented behavior (#2359)

This commit is contained in:
Paulus Schoutsen
2016-06-24 21:27:40 -07:00
committed by GitHub
parent c616115419
commit 68df3deee0
22 changed files with 56 additions and 41 deletions

View File

@@ -229,17 +229,15 @@ class ToggleEntity(Entity):
@property
def is_on(self):
"""Return True if entity is on."""
return False
raise NotImplementedError()
def turn_on(self, **kwargs):
"""Turn the entity on."""
_LOGGER.warning('Method turn_on not implemented for %s',
self.entity_id)
raise NotImplementedError()
def turn_off(self, **kwargs):
"""Turn the entity off."""
_LOGGER.warning('Method turn_off not implemented for %s',
self.entity_id)
raise NotImplementedError()
def toggle(self, **kwargs):
"""Toggle the entity off."""