Bump letpot to 0.6.1 (#150137)

This commit is contained in:
Joris Pelgröm
2025-08-07 08:08:47 +02:00
committed by GitHub
parent d17f0ef55a
commit 566aeb5e9a
5 changed files with 13 additions and 7 deletions

View File

@@ -8,5 +8,5 @@
"iot_class": "cloud_push",
"loggers": ["letpot"],
"quality_scale": "bronze",
"requirements": ["letpot==0.5.0"]
"requirements": ["letpot==0.6.1"]
}

2
requirements_all.txt generated
View File

@@ -1340,7 +1340,7 @@ led-ble==1.1.7
lektricowifi==0.1
# homeassistant.components.letpot
letpot==0.5.0
letpot==0.6.1
# homeassistant.components.foscam
libpyfoscamcgi==0.0.6

View File

@@ -1159,7 +1159,7 @@ led-ble==1.1.7
lektricowifi==0.1
# homeassistant.components.letpot
letpot==0.5.0
letpot==0.6.1
# homeassistant.components.foscam
libpyfoscamcgi==0.0.6

View File

@@ -6,6 +6,7 @@ from letpot.models import (
AuthenticationInfo,
LetPotDeviceErrors,
LetPotDeviceStatus,
LightMode,
TemperatureUnit,
)
@@ -33,7 +34,7 @@ AUTHENTICATION = AuthenticationInfo(
MAX_STATUS = LetPotDeviceStatus(
errors=LetPotDeviceErrors(low_water=True, low_nutrients=False, refill_error=False),
light_brightness=500,
light_mode=1,
light_mode=LightMode.VEGETABLE,
light_schedule_end=datetime.time(18, 0),
light_schedule_start=datetime.time(8, 0),
online=True,
@@ -53,7 +54,7 @@ MAX_STATUS = LetPotDeviceStatus(
SE_STATUS = LetPotDeviceStatus(
errors=LetPotDeviceErrors(low_water=True, pump_malfunction=True),
light_brightness=500,
light_mode=1,
light_mode=LightMode.VEGETABLE,
light_schedule_end=datetime.time(18, 0),
light_schedule_start=datetime.time(8, 0),
online=True,

View File

@@ -44,10 +44,15 @@ def _mock_device_info(device_type: str) -> LetPotDeviceInfo:
def _mock_device_features(device_type: str) -> DeviceFeature:
"""Return mock device feature support for the given type."""
if device_type == "LPH31":
return DeviceFeature.LIGHT_BRIGHTNESS_LOW_HIGH | DeviceFeature.PUMP_STATUS
return (
DeviceFeature.CATEGORY_HYDROPONIC_GARDEN
| DeviceFeature.LIGHT_BRIGHTNESS_LOW_HIGH
| DeviceFeature.PUMP_STATUS
)
if device_type == "LPH63":
return (
DeviceFeature.LIGHT_BRIGHTNESS_LEVELS
DeviceFeature.CATEGORY_HYDROPONIC_GARDEN
| DeviceFeature.LIGHT_BRIGHTNESS_LEVELS
| DeviceFeature.NUTRIENT_BUTTON
| DeviceFeature.PUMP_AUTO
| DeviceFeature.PUMP_STATUS