1
0
mirror of https://github.com/home-assistant/core.git synced 2025-05-02 05:07:52 +00:00

10 lines
349 B
Python

"""Test the sma sensor platform."""
from homeassistant.const import ATTR_UNIT_OF_MEASUREMENT, UnitOfPower
async def test_sensors(hass, init_integration):
"""Test states of the sensors."""
state = hass.states.get("sensor.sma_device_grid_power")
assert state
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == UnitOfPower.WATT