Add additional checks for Enpower supported feature (#117107)

This commit is contained in:
Charles Garwood
2024-06-22 03:27:17 -04:00
committed by GitHub
parent 32a94fc114
commit f3d2ba7d8d
2 changed files with 2 additions and 0 deletions

View File

@@ -89,6 +89,7 @@ async def async_setup_entry(
envoy_data.tariff
and envoy_data.tariff.storage_settings
and coordinator.envoy.supported_features & SupportedFeatures.ENCHARGE
and coordinator.envoy.supported_features & SupportedFeatures.ENPOWER
):
entities.append(
EnvoyStorageSettingsNumberEntity(coordinator, STORAGE_RESERVE_SOC_ENTITY)

View File

@@ -144,6 +144,7 @@ async def async_setup_entry(
envoy_data.tariff
and envoy_data.tariff.storage_settings
and coordinator.envoy.supported_features & SupportedFeatures.ENCHARGE
and coordinator.envoy.supported_features & SupportedFeatures.ENPOWER
):
entities.append(
EnvoyStorageSettingsSelectEntity(coordinator, STORAGE_MODE_ENTITY)