Implement suggested_display_precision for ESPHome (#147849)

This commit is contained in:
Jesse Hills
2025-07-01 19:16:23 +12:00
committed by GitHub
parent 35f0505c7b
commit 9469c6ad1c
3 changed files with 75 additions and 4 deletions

View File

@@ -375,7 +375,7 @@ async def test_deep_sleep_device(
assert state.state == STATE_ON
state = hass.states.get("sensor.test_my_sensor")
assert state is not None
assert state.state == "123"
assert state.state == "123.0"
await mock_device.mock_disconnect(False)
await hass.async_block_till_done()
@@ -394,7 +394,7 @@ async def test_deep_sleep_device(
assert state.state == STATE_ON
state = hass.states.get("sensor.test_my_sensor")
assert state is not None
assert state.state == "123"
assert state.state == "123.0"
await mock_device.mock_disconnect(True)
await hass.async_block_till_done()