Drop deprecated support for unit_of_measurement from sensor (#69061)
This commit is contained in:
parent
9b21a48048
commit
87100c2517
2 changed files with 1 additions and 39 deletions
|
@ -4,7 +4,7 @@ from datetime import date, datetime, timezone
|
|||
import pytest
|
||||
from pytest import approx
|
||||
|
||||
from homeassistant.components.sensor import SensorDeviceClass, SensorEntityDescription
|
||||
from homeassistant.components.sensor import SensorDeviceClass
|
||||
from homeassistant.const import (
|
||||
ATTR_UNIT_OF_MEASUREMENT,
|
||||
PRESSURE_HPA,
|
||||
|
@ -116,15 +116,6 @@ async def test_deprecated_last_reset(
|
|||
assert "last_reset" not in state.attributes
|
||||
|
||||
|
||||
async def test_deprecated_unit_of_measurement(hass, caplog, enable_custom_integrations):
|
||||
"""Test warning on deprecated unit_of_measurement."""
|
||||
SensorEntityDescription("catsensor", unit_of_measurement="cats")
|
||||
assert (
|
||||
"tests.components.sensor.test_init is setting 'unit_of_measurement' on an "
|
||||
"instance of SensorEntityDescription"
|
||||
) in caplog.text
|
||||
|
||||
|
||||
async def test_datetime_conversion(hass, caplog, enable_custom_integrations):
|
||||
"""Test conversion of datetime."""
|
||||
test_timestamp = datetime(2017, 12, 19, 18, 29, 42, tzinfo=timezone.utc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue