From 355b6f742db69cdb2dd5bf07e9c673b318aa8bd7 Mon Sep 17 00:00:00 2001 From: Jeff Irion Date: Sun, 19 Jan 2020 18:41:06 -0800 Subject: [PATCH 1/2] Fix capability_attributes when supported_features is None (water_heater) --- homeassistant/components/water_heater/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/water_heater/__init__.py b/homeassistant/components/water_heater/__init__.py index 8da94ff1098fc4..ecff3105ae0f47 100644 --- a/homeassistant/components/water_heater/__init__.py +++ b/homeassistant/components/water_heater/__init__.py @@ -146,7 +146,7 @@ def precision(self): @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( From b608401618e009b4b7d2b250bb05be35375e972b Mon Sep 17 00:00:00 2001 From: Jeff Irion Date: Sun, 19 Jan 2020 18:44:07 -0800 Subject: [PATCH 2/2] Fix capability_attributes when supported_features is None (media_player) --- homeassistant/components/media_player/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/media_player/__init__.py b/homeassistant/components/media_player/__init__.py index 83c117d6c055fc..b73208402f8716 100644 --- a/homeassistant/components/media_player/__init__.py +++ b/homeassistant/components/media_player/__init__.py @@ -785,7 +785,7 @@ def entity_picture(self): @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: