emptying device state attributes if the update from the feed fails (#17249)

This commit is contained in:
Malte Franken authored and Paulus Schoutsen committed 2018-10-08 16:13:08 +02:00
1 parent 42fb886d71
commit b637b48bd8
2 files changed
+5

No files matched your search

@@ -123,6 +123,10 @@ class TestGeoRssServiceUpdater(unittest.TestCase):
assert len(all_states) == 1
state = self.hass.states.get("sensor.event_service_any")
assert int(state.state) == 0
assert state.attributes == {
ATTR_FRIENDLY_NAME: "Event Service Any",
ATTR_UNIT_OF_MEASUREMENT: "Events",
ATTR_ICON: "mdi:alert"}
@mock.patch('georss_client.generic_feed.GenericFeed')
def test_setup_with_categories(self, mock_feed):