mirror of
https://github.com/home-assistant/core.git
synced 2025-11-11 20:10:12 +00:00
Add state class measurement to all suitable sensors on Speedtest.net (#53693)
* Add state class measurement * use tuple instead of list
This commit is contained in:
@@ -26,9 +26,7 @@ async def test_speedtestdotnet_sensors(
|
||||
|
||||
assert len(hass.states.async_entity_ids(SENSOR_DOMAIN)) == 3
|
||||
|
||||
for sensor_type in SENSOR_TYPES:
|
||||
sensor = hass.states.get(
|
||||
f"sensor.{DEFAULT_NAME}_{SENSOR_TYPES[sensor_type][0]}"
|
||||
)
|
||||
for description in SENSOR_TYPES:
|
||||
sensor = hass.states.get(f"sensor.{DEFAULT_NAME}_{description.name}")
|
||||
assert sensor
|
||||
assert sensor.state == MOCK_STATES[sensor_type]
|
||||
assert sensor.state == MOCK_STATES[description.key]
|
||||
|
||||
Reference in New Issue
Block a user