Correct state class in mobile_app tests (#107646)

Correct right state class in `mobile_app` tests
This commit is contained in:
Jan-Philipp Benecke 2024-01-09 14:08:58 +01:00 committed by GitHub
parent c9d0134b8b
commit fd533e46dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -53,7 +53,7 @@ async def test_sensor(
"type": "sensor",
"entity_category": "diagnostic",
"unique_id": "battery_temp",
"state_class": "total",
"state_class": "measurement",
"unit_of_measurement": UnitOfTemperature.CELSIUS,
},
},
@ -73,7 +73,7 @@ async def test_sensor(
# unit of temperature sensor is automatically converted to the system UoM
assert entity.attributes["unit_of_measurement"] == state_unit
assert entity.attributes["foo"] == "bar"
assert entity.attributes["state_class"] == "total"
assert entity.attributes["state_class"] == "measurement"
assert entity.domain == "sensor"
assert entity.name == "Test 1 Battery Temperature"
assert entity.state == state1
@ -175,7 +175,7 @@ async def test_sensor_migration(
"type": "sensor",
"entity_category": "diagnostic",
"unique_id": unique_id,
"state_class": "total",
"state_class": "measurement",
"unit_of_measurement": UnitOfTemperature.CELSIUS,
},
},
@ -195,7 +195,7 @@ async def test_sensor_migration(
# unit of temperature sensor is automatically converted to the system UoM
assert entity.attributes["unit_of_measurement"] == state_unit
assert entity.attributes["foo"] == "bar"
assert entity.attributes["state_class"] == "total"
assert entity.attributes["state_class"] == "measurement"
assert entity.domain == "sensor"
assert entity.name == "Test 1 Battery Temperature"
assert entity.state == state1

View file

@ -962,7 +962,7 @@ async def test_reregister_sensor(
"state": 100,
"type": "sensor",
"unique_id": "abcd",
"state_class": "total",
"state_class": "measurement",
"device_class": "battery",
"entity_category": "diagnostic",
"icon": "mdi:new-icon",