Import WaterHeaterFeature from aioesphomeapi instead of redefining locally

This commit is contained in:
J. Nick Koston
2026-02-10 05:47:46 -06:00
parent 3410ee2420
commit 22b038f6a4

View File

@@ -6,28 +6,18 @@ import asyncio
import aioesphomeapi
from aioesphomeapi import (
WaterHeaterFeature,
WaterHeaterInfo,
WaterHeaterMode,
WaterHeaterState,
WaterHeaterStateFlag,
)
from aioesphomeapi.model import APIIntEnum
import pytest
from .state_utils import InitialStateHelper
from .types import APIClientConnectedFactory, RunCompiledFunction
class WaterHeaterFeature(APIIntEnum):
"""ESPHome water heater feature flags (WaterHeaterFeature)."""
SUPPORTS_CURRENT_TEMPERATURE = 1 << 0
SUPPORTS_TARGET_TEMPERATURE = 1 << 1
SUPPORTS_OPERATION_MODE = 1 << 2
SUPPORTS_AWAY_MODE = 1 << 3
SUPPORTS_ON_OFF = 1 << 4
@pytest.mark.asyncio
async def test_water_heater_template(
yaml_config: str,