mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Fix test
This commit is contained in:
parent
941f9b29dc
commit
3ce50b0a6a
@ -37,11 +37,8 @@ async def test_sensor(hass, create_registrations, webhook_client): # noqa: F401
|
|||||||
json = await reg_resp.json()
|
json = await reg_resp.json()
|
||||||
assert json == {'status': 'registered'}
|
assert json == {'status': 'registered'}
|
||||||
|
|
||||||
# 3 because we require device_tracker which adds zone.home and
|
entity = hass.states.get('sensor.battery_state')
|
||||||
# group.all_devices
|
assert entity is not None
|
||||||
assert len(hass.states.async_all()) == 3
|
|
||||||
|
|
||||||
entity = hass.states.async_all()[2]
|
|
||||||
|
|
||||||
assert entity.attributes['device_class'] == 'battery'
|
assert entity.attributes['device_class'] == 'battery'
|
||||||
assert entity.attributes['icon'] == 'mdi:battery'
|
assert entity.attributes['icon'] == 'mdi:battery'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user