Implement is_on (#15459)

* Implement is_on

* Remove var
This commit is contained in:
Tom Harris authored and Fabian Affolter committed 2018-07-14 11:04:00 +02:00
1 parent 3b5775573b
commit 201c9fed77
1 file changed
+6 -2
@@ -46,8 +46,7 @@ class InsteonPLMSwitchDevice(InsteonPLMEntity, SwitchDevice):
@property
def is_on(self):
"""Return the boolean response if the node is on."""
onlevel = self._insteon_device_state.value
return bool(onlevel)
return bool(self._insteon_device_state.value)
@asyncio.coroutine
def async_turn_on(self, **kwargs):
@@ -63,6 +62,11 @@ class InsteonPLMSwitchDevice(InsteonPLMEntity, SwitchDevice):
class InsteonPLMOpenClosedDevice(InsteonPLMEntity, SwitchDevice):
"""A Class for an Insteon device."""
@property
def is_on(self):
"""Return the boolean response if the node is on."""
return bool(self._insteon_device_state.value)
@asyncio.coroutine
def async_turn_on(self, **kwargs):
"""Turn device on."""