1
0
mirror of https://github.com/home-assistant/core.git synced 2025-06-25 23:47:08 +00:00
René Klomp 496583bca5
Prefix sma sensor name ()
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2022-02-19 20:27:06 +01:00

10 lines
342 B
Python

"""Test the sma sensor platform."""
from homeassistant.const import ATTR_UNIT_OF_MEASUREMENT, POWER_WATT
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) == POWER_WATT