mirror of
https://github.com/esphome/esphome.git
synced 2026-02-18 23:45:40 -07:00
Import WaterHeaterFeature from aioesphomeapi instead of redefining locally
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user