diff --git a/homeassistant/components/binary_sensor/rest.py b/homeassistant/components/binary_sensor/rest.py index abdbc8251c7bc..6d1745700bd1f 100644 --- a/homeassistant/components/binary_sensor/rest.py +++ b/homeassistant/components/binary_sensor/rest.py @@ -107,6 +107,8 @@ def is_on(self): if self.rest.data is None: return False + response = self.rest.data + if self._value_template is not None: response = self._value_template.\ async_render_with_possible_json_value(self.rest.data, False)