This commit is contained in:
Paulus Schoutsen
2019-03-15 10:59:50 -07:00
parent ac1aeb35a6
commit b18aef8d31
+2 -5
View File
@@ -37,11 +37,8 @@ async def test_sensor(hass, create_registrations, webhook_client): # noqa: F401
json = await reg_resp.json()
assert json == {'status': 'registered'}
# 3 because we require device_tracker which adds zone.home and
# group.all_devices
assert len(hass.states.async_all()) == 3
entity = hass.states.async_all()[2]
entity = hass.states.get('sensor.battery_state')
assert entity is not None
assert entity.attributes['device_class'] == 'battery'
assert entity.attributes['icon'] == 'mdi:battery'