mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Ensure entity platform in dsmr_reader tests (#135718)
This commit is contained in:
parent
21256cab85
commit
cde3ba5504
@ -12,7 +12,7 @@ from homeassistant.components.dsmr_reader.sensor import DSMRSensor
|
||||
from homeassistant.const import STATE_UNKNOWN
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
from tests.common import MockConfigEntry, async_fire_mqtt_message
|
||||
from tests.common import MockConfigEntry, MockEntityPlatform, async_fire_mqtt_message
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@ -93,6 +93,7 @@ async def test_entity_dsmr_transform(hass: HomeAssistant) -> None:
|
||||
)
|
||||
sensor = DSMRSensor(description, config_entry)
|
||||
sensor.hass = hass
|
||||
sensor.platform = MockEntityPlatform(hass)
|
||||
await sensor.async_added_to_hass()
|
||||
|
||||
# Test dsmr version, if it's a digit
|
||||
|
Loading…
x
Reference in New Issue
Block a user