mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 11:47:06 +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
|
@property
|
||||||
def capability_attributes(self):
|
def capability_attributes(self):
|
||||||
"""Return capabilitiy attributes."""
|
"""Return capabilitiy attributes."""
|
||||||
supported_features = self.supported_features
|
supported_features = self.supported_features or 0
|
||||||
data = {}
|
data = {}
|
||||||
|
|
||||||
if supported_features & SUPPORT_SELECT_SOURCE:
|
if supported_features & SUPPORT_SELECT_SOURCE:
|
||||||
|
@ -146,7 +146,7 @@ class WaterHeaterDevice(Entity):
|
|||||||
@property
|
@property
|
||||||
def capability_attributes(self):
|
def capability_attributes(self):
|
||||||
"""Return capabilitiy attributes."""
|
"""Return capabilitiy attributes."""
|
||||||
supported_features = self.supported_features
|
supported_features = self.supported_features or 0
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
ATTR_MIN_TEMP: show_temp(
|
ATTR_MIN_TEMP: show_temp(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user