From e5caab384b3438ff70475a48ebb239fa26079a39 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Thu, 15 Oct 2026 14:23:26 +0200 Subject: [PATCH] Define public names of the valve integration (#186640) --- homeassistant/components/valve/__init__.py | 32 ++++++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/valve/__init__.py b/homeassistant/components/valve/__init__.py index b4fa62620c2e..cc89507a6c0b 100644 --- a/homeassistant/components/valve/__init__.py +++ b/homeassistant/components/valve/__init__.py @@ -4,7 +4,7 @@ from datetime import timedelta import logging from homeassistant.config_entries import ConfigEntry -from homeassistant.const import ( # noqa: F401 +from homeassistant.const import ( SERVICE_CLOSE_VALVE, SERVICE_OPEN_VALVE, SERVICE_SET_VALVE_POSITION, @@ -20,7 +20,7 @@ from homeassistant.helpers import config_validation as cv from homeassistant.helpers.entity_component import EntityComponent from homeassistant.helpers.typing import ConfigType -from .const import ( # noqa: F401 +from .const import ( ATTR_POSITION, DATA_COMPONENT, DEVICE_CLASSES_SCHEMA, @@ -30,7 +30,7 @@ from .const import ( # noqa: F401 ValveEntityStateAttribute, ValveState, ) -from .entity import ( # noqa: F401 +from .entity import ( ATTR_CURRENT_POSITION, ATTR_IS_CLOSED, ValveEntity, @@ -45,6 +45,32 @@ PLATFORM_SCHEMA = cv.PLATFORM_SCHEMA PLATFORM_SCHEMA_BASE = cv.PLATFORM_SCHEMA_BASE SCAN_INTERVAL = timedelta(seconds=15) +__all__ = [ + "ATTR_CURRENT_POSITION", + "ATTR_IS_CLOSED", + "ATTR_POSITION", + "DEVICE_CLASSES_SCHEMA", + "DOMAIN", + "ENTITY_ID_FORMAT", + "PLATFORM_SCHEMA", + "PLATFORM_SCHEMA_BASE", + "SERVICE_CLOSE_VALVE", + "SERVICE_OPEN_VALVE", + "SERVICE_SET_VALVE_POSITION", + "SERVICE_STOP_VALVE", + "SERVICE_TOGGLE", + "STATE_CLOSED", + "STATE_CLOSING", + "STATE_OPEN", + "STATE_OPENING", + "ValveDeviceClass", + "ValveEntity", + "ValveEntityDescription", + "ValveEntityFeature", + "ValveEntityStateAttribute", + "ValveState", +] + async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: """Track states and offer events for valves."""