mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 13:15:18 +02: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:
committed by
Franck Nijhof
parent
6889816704
commit
392cf57750
@@ -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(
|
||||||
|
Reference in New Issue
Block a user