mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Drop UNIT_ prefix for percentage constant (#39383)
This commit is contained in:
@@ -4,7 +4,7 @@ import pytest
|
||||
import homeassistant.components.automation as automation
|
||||
from homeassistant.components.sensor import DOMAIN
|
||||
from homeassistant.components.sensor.device_condition import ENTITY_CONDITIONS
|
||||
from homeassistant.const import CONF_PLATFORM, STATE_UNKNOWN, UNIT_PERCENTAGE
|
||||
from homeassistant.const import CONF_PLATFORM, PERCENTAGE, STATE_UNKNOWN
|
||||
from homeassistant.helpers import device_registry
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
@@ -99,13 +99,13 @@ async def test_get_condition_capabilities(hass, device_reg, entity_reg):
|
||||
expected_capabilities = {
|
||||
"extra_fields": [
|
||||
{
|
||||
"description": {"suffix": UNIT_PERCENTAGE},
|
||||
"description": {"suffix": PERCENTAGE},
|
||||
"name": "above",
|
||||
"optional": True,
|
||||
"type": "float",
|
||||
},
|
||||
{
|
||||
"description": {"suffix": UNIT_PERCENTAGE},
|
||||
"description": {"suffix": PERCENTAGE},
|
||||
"name": "below",
|
||||
"optional": True,
|
||||
"type": "float",
|
||||
|
||||
@@ -6,7 +6,7 @@ import pytest
|
||||
import homeassistant.components.automation as automation
|
||||
from homeassistant.components.sensor import DOMAIN
|
||||
from homeassistant.components.sensor.device_trigger import ENTITY_TRIGGERS
|
||||
from homeassistant.const import CONF_PLATFORM, STATE_UNKNOWN, UNIT_PERCENTAGE
|
||||
from homeassistant.const import CONF_PLATFORM, PERCENTAGE, STATE_UNKNOWN
|
||||
from homeassistant.helpers import device_registry
|
||||
from homeassistant.setup import async_setup_component
|
||||
import homeassistant.util.dt as dt_util
|
||||
@@ -104,13 +104,13 @@ async def test_get_trigger_capabilities(hass, device_reg, entity_reg):
|
||||
expected_capabilities = {
|
||||
"extra_fields": [
|
||||
{
|
||||
"description": {"suffix": UNIT_PERCENTAGE},
|
||||
"description": {"suffix": PERCENTAGE},
|
||||
"name": "above",
|
||||
"optional": True,
|
||||
"type": "float",
|
||||
},
|
||||
{
|
||||
"description": {"suffix": UNIT_PERCENTAGE},
|
||||
"description": {"suffix": PERCENTAGE},
|
||||
"name": "below",
|
||||
"optional": True,
|
||||
"type": "float",
|
||||
|
||||
Reference in New Issue
Block a user