Replace the usage of unit constants by enumerations in Tests [m-n] (#85935)
* replace unit conts by enums m-n * fix mqtt
This commit is contained in:
parent
e35ab75c0b
commit
104f74054b
16 changed files with 141 additions and 113 deletions
|
@ -21,8 +21,8 @@ from homeassistant.const import (
|
|||
ATTR_ASSUMED_STATE,
|
||||
EVENT_HOMEASSISTANT_STARTED,
|
||||
EVENT_HOMEASSISTANT_STOP,
|
||||
TEMP_CELSIUS,
|
||||
Platform,
|
||||
UnitOfTemperature,
|
||||
)
|
||||
import homeassistant.core as ha
|
||||
from homeassistant.core import CoreState, HomeAssistant, callback
|
||||
|
@ -816,7 +816,7 @@ async def test_all_subscriptions_run_when_decode_fails(
|
|||
await mqtt.async_subscribe(hass, "test-topic", record_calls, encoding="ascii")
|
||||
await mqtt.async_subscribe(hass, "test-topic", record_calls)
|
||||
|
||||
async_fire_mqtt_message(hass, "test-topic", TEMP_CELSIUS)
|
||||
async_fire_mqtt_message(hass, "test-topic", UnitOfTemperature.CELSIUS)
|
||||
|
||||
await hass.async_block_till_done()
|
||||
assert len(calls) == 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue