mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Correct state class in mobile_app
tests (#107646)
Correct right state class in `mobile_app` tests
This commit is contained in:
parent
c9d0134b8b
commit
fd533e46dd
@ -53,7 +53,7 @@ async def test_sensor(
|
|||||||
"type": "sensor",
|
"type": "sensor",
|
||||||
"entity_category": "diagnostic",
|
"entity_category": "diagnostic",
|
||||||
"unique_id": "battery_temp",
|
"unique_id": "battery_temp",
|
||||||
"state_class": "total",
|
"state_class": "measurement",
|
||||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -73,7 +73,7 @@ async def test_sensor(
|
|||||||
# unit of temperature sensor is automatically converted to the system UoM
|
# unit of temperature sensor is automatically converted to the system UoM
|
||||||
assert entity.attributes["unit_of_measurement"] == state_unit
|
assert entity.attributes["unit_of_measurement"] == state_unit
|
||||||
assert entity.attributes["foo"] == "bar"
|
assert entity.attributes["foo"] == "bar"
|
||||||
assert entity.attributes["state_class"] == "total"
|
assert entity.attributes["state_class"] == "measurement"
|
||||||
assert entity.domain == "sensor"
|
assert entity.domain == "sensor"
|
||||||
assert entity.name == "Test 1 Battery Temperature"
|
assert entity.name == "Test 1 Battery Temperature"
|
||||||
assert entity.state == state1
|
assert entity.state == state1
|
||||||
@ -175,7 +175,7 @@ async def test_sensor_migration(
|
|||||||
"type": "sensor",
|
"type": "sensor",
|
||||||
"entity_category": "diagnostic",
|
"entity_category": "diagnostic",
|
||||||
"unique_id": unique_id,
|
"unique_id": unique_id,
|
||||||
"state_class": "total",
|
"state_class": "measurement",
|
||||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
"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
|
# unit of temperature sensor is automatically converted to the system UoM
|
||||||
assert entity.attributes["unit_of_measurement"] == state_unit
|
assert entity.attributes["unit_of_measurement"] == state_unit
|
||||||
assert entity.attributes["foo"] == "bar"
|
assert entity.attributes["foo"] == "bar"
|
||||||
assert entity.attributes["state_class"] == "total"
|
assert entity.attributes["state_class"] == "measurement"
|
||||||
assert entity.domain == "sensor"
|
assert entity.domain == "sensor"
|
||||||
assert entity.name == "Test 1 Battery Temperature"
|
assert entity.name == "Test 1 Battery Temperature"
|
||||||
assert entity.state == state1
|
assert entity.state == state1
|
||||||
|
@ -962,7 +962,7 @@ async def test_reregister_sensor(
|
|||||||
"state": 100,
|
"state": 100,
|
||||||
"type": "sensor",
|
"type": "sensor",
|
||||||
"unique_id": "abcd",
|
"unique_id": "abcd",
|
||||||
"state_class": "total",
|
"state_class": "measurement",
|
||||||
"device_class": "battery",
|
"device_class": "battery",
|
||||||
"entity_category": "diagnostic",
|
"entity_category": "diagnostic",
|
||||||
"icon": "mdi:new-icon",
|
"icon": "mdi:new-icon",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user