mirror of
https://github.com/home-assistant/core.git
synced 2025-12-23 12:29:55 +00:00
SMA code quality improvement and bugfix (#49346)
* Minor code quality improvements Thanks to @MartinHjelmare * Convert legacy dict config to list * Improved test * Typo * Test improvements * Create fixtures in conftest.py
This commit is contained in:
@@ -5,13 +5,11 @@ from homeassistant.const import (
|
||||
POWER_WATT,
|
||||
)
|
||||
|
||||
from . import MOCK_CUSTOM_SENSOR, init_integration
|
||||
from . import MOCK_CUSTOM_SENSOR
|
||||
|
||||
|
||||
async def test_sensors(hass):
|
||||
async def test_sensors(hass, init_integration):
|
||||
"""Test states of the sensors."""
|
||||
await init_integration(hass)
|
||||
|
||||
state = hass.states.get("sensor.current_consumption")
|
||||
assert state
|
||||
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == POWER_WATT
|
||||
|
||||
Reference in New Issue
Block a user