1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Clean up constants (#46948)

* Clean up constants

* clean up humidifier constants

* fix tests

* fix prometheus tests

Co-authored-by: Tobias Sauerwein <cgtobi@users.noreply.github.com>
This commit is contained in:
tkdrob
2021-03-02 06:52:00 -05:00
committed by GitHub
parent dc880118a4
commit ab53b49d3f
31 changed files with 69 additions and 68 deletions

View File

@@ -6,7 +6,7 @@ import voluptuous_serialize
import homeassistant.components.automation as automation
from homeassistant.components.humidifier import DOMAIN, const, device_trigger
from homeassistant.const import ATTR_SUPPORTED_FEATURES, STATE_OFF, STATE_ON
from homeassistant.const import ATTR_MODE, ATTR_SUPPORTED_FEATURES, STATE_OFF, STATE_ON
from homeassistant.helpers import config_validation as cv, device_registry
from homeassistant.setup import async_setup_component
import homeassistant.util.dt as dt_util
@@ -56,7 +56,7 @@ async def test_get_triggers(hass, device_reg, entity_reg):
STATE_ON,
{
const.ATTR_HUMIDITY: 23,
const.ATTR_MODE: "home",
ATTR_MODE: "home",
const.ATTR_AVAILABLE_MODES: ["home", "away"],
ATTR_SUPPORTED_FEATURES: 1,
},
@@ -95,7 +95,7 @@ async def test_if_fires_on_state_change(hass, calls):
STATE_ON,
{
const.ATTR_HUMIDITY: 23,
const.ATTR_MODE: "home",
ATTR_MODE: "home",
const.ATTR_AVAILABLE_MODES: ["home", "away"],
ATTR_SUPPORTED_FEATURES: 1,
},
@@ -243,7 +243,7 @@ async def test_invalid_config(hass, calls):
STATE_ON,
{
const.ATTR_HUMIDITY: 23,
const.ATTR_MODE: "home",
ATTR_MODE: "home",
const.ATTR_AVAILABLE_MODES: ["home", "away"],
ATTR_SUPPORTED_FEATURES: 1,
},