mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 09:17:53 +00:00
Fix capability_attributes when supported_features is None (#30993)
* Fix capability_attributes when supported_features is None (water_heater) * Fix capability_attributes when supported_features is None (media_player)
This commit is contained in:
parent
b2212ad445
commit
bb37f7bb75
@ -785,7 +785,7 @@ class MediaPlayerDevice(Entity):
|
||||
@property
|
||||
def capability_attributes(self):
|
||||
"""Return capabilitiy attributes."""
|
||||
supported_features = self.supported_features
|
||||
supported_features = self.supported_features or 0
|
||||
data = {}
|
||||
|
||||
if supported_features & SUPPORT_SELECT_SOURCE:
|
||||
|
@ -146,7 +146,7 @@ class WaterHeaterDevice(Entity):
|
||||
@property
|
||||
def capability_attributes(self):
|
||||
"""Return capabilitiy attributes."""
|
||||
supported_features = self.supported_features
|
||||
supported_features = self.supported_features or 0
|
||||
|
||||
data = {
|
||||
ATTR_MIN_TEMP: show_temp(
|
||||
|
Loading…
x
Reference in New Issue
Block a user