Ensure bond light follows proper typing (#47641)

This commit is contained in:
Philip Allgaier 2021-03-08 21:53:44 +01:00 committed by GitHub
parent 215ab5fd40
commit 665e2c3473
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,7 +95,7 @@ class BondBaseLight(BondEntity, LightEntity):
return self._light == 1
@property
def supported_features(self) -> Optional[int]:
def supported_features(self) -> int:
"""Flag supported features."""
return 0
@ -119,7 +119,7 @@ class BondLight(BondBaseLight, BondEntity, LightEntity):
self._brightness = state.get("brightness")
@property
def supported_features(self) -> Optional[int]:
def supported_features(self) -> int:
"""Flag supported features."""
if self._device.supports_set_brightness():
return SUPPORT_BRIGHTNESS
@ -203,7 +203,7 @@ class BondFireplace(BondEntity, LightEntity):
self._flame = state.get("flame")
@property
def supported_features(self) -> Optional[int]:
def supported_features(self) -> int:
"""Flag brightness as supported feature to represent flame level."""
return SUPPORT_BRIGHTNESS