From 392cf57750816901fa3892ef67c820f6cfe05247 Mon Sep 17 00:00:00 2001 From: Jeff Irion Date: Sun, 19 Jan 2020 23:06:35 -0800 Subject: [PATCH] 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) --- homeassistant/components/media_player/__init__.py | 2 +- homeassistant/components/water_heater/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/media_player/__init__.py b/homeassistant/components/media_player/__init__.py index 83c117d6c05..b73208402f8 100644 --- a/homeassistant/components/media_player/__init__.py +++ b/homeassistant/components/media_player/__init__.py @@ -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: diff --git a/homeassistant/components/water_heater/__init__.py b/homeassistant/components/water_heater/__init__.py index 8da94ff1098..ecff3105ae0 100644 --- a/homeassistant/components/water_heater/__init__.py +++ b/homeassistant/components/water_heater/__init__.py @@ -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(