Merge pull request #1269 from turbokongen/rfxtrx-newprotocols
Add assumed_state for rfxtrx switch and light.
This commit is contained in:
commit
bbfa63ee79
2 files changed
+10
No files matched your search
@@ -152,6 +152,11 @@ class RfxtrxLight(Light):
|
|||||||
""" Brightness of this light between 0..255. """
|
""" Brightness of this light between 0..255. """
|
||||||
return self._brightness
|
return self._brightness
|
||||||
|
|
||||||
|
@property
|
||||||
|
def assumed_state(self):
|
||||||
|
"""Return True if unable to access real state of entity."""
|
||||||
|
return True
|
||||||
|
|
||||||
def turn_on(self, **kwargs):
|
def turn_on(self, **kwargs):
|
||||||
""" Turn the light on. """
|
""" Turn the light on. """
|
||||||
brightness = kwargs.get(ATTR_BRIGHTNESS)
|
brightness = kwargs.get(ATTR_BRIGHTNESS)
|
||||||
|
|||||||
@@ -132,6 +132,11 @@ class RfxtrxSwitch(SwitchDevice):
|
|||||||
""" True if light is on. """
|
""" True if light is on. """
|
||||||
return self._state
|
return self._state
|
||||||
|
|
||||||
|
@property
|
||||||
|
def assumed_state(self):
|
||||||
|
"""Return True if unable to access real state of entity."""
|
||||||
|
return True
|
||||||
|
|
||||||
def turn_on(self, **kwargs):
|
def turn_on(self, **kwargs):
|
||||||
""" Turn the device on. """
|
""" Turn the device on. """
|
||||||
if self._event:
|
if self._event:
|
||||||
|
|||||||
Reference in new issue
Block a user