From 8303ed535b6475135f41c0307787b28022607bf3 Mon Sep 17 00:00:00 2001 From: Vincent Wolsink Date: Mon, 23 Sep 2024 17:54:29 +0200 Subject: [PATCH] Attempt at setting sane cache values --- .../enphase_envoy/envoy_endpoints.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/custom_components/enphase_envoy/envoy_endpoints.py b/custom_components/enphase_envoy/envoy_endpoints.py index 11469ad..4f4b5de 100644 --- a/custom_components/enphase_envoy/envoy_endpoints.py +++ b/custom_components/enphase_envoy/envoy_endpoints.py @@ -2,7 +2,7 @@ # Generic endpoints "info": { "url": "https://{}/info.xml", - "cache": 20, + "cache": 86400, "installer_required": False, "optional": False, }, @@ -15,13 +15,13 @@ }, "production_v1": { "url": "https://{}/api/v1/production", - "cache": 20, + "cache": 0, "installer_required": False, "optional": False, }, "production_inverters": { "url": "https://{}/api/v1/production/inverters", - "cache": 20, + "cache": 0, "installer_required": False, "optional": False, }, @@ -33,32 +33,32 @@ }, "production_power": { "url": "https://{}/ivp/mod/603980032/mode/power", - "cache": 20, + "cache": 300, "installer_required": False, "optional": True, }, "pdm_energy": { "url": "https://{}/ivp/pdm/energy", - "cache": 20, + "cache": 0, "installer_required": True, "optional": False, }, # Battery endpoints "ensemble_inventory": { "url": "https://{}/ivp/ensemble/inventory", - "cache": 20, + "cache": 0, "installer_required": False, "optional": True, }, "ensemble_secctrl": { "url": "https://{}/ivp/ensemble/secctrl", - "cache": 20, + "cache": 0, "installer_required": False, "optional": True, }, "ensemble_power": { "url": "https://{}/ivp/ensemble/power", - "cache": 20, + "cache": 0, "installer_required": False, "optional": True, }, @@ -71,27 +71,27 @@ }, "devstatus": { "url": "https://{}/ivp/peb/devstatus", - "cache": 20, + "cache": 0, "installer_required": True, "optional": False, }, "pcu_comm_status": { "url": "https://{}/installer/pcu_comm_check", - "cache": 90, + "cache": 3600, "installer_required": True, "optional": True, }, # Netprofile endpoints "installer_agf": { "url": "https://{}/installer/agf/index.json", - "cache": 10, + "cache": 3600, "installer_required": True, "optional": True, }, # Tariff endpoints "admin_tariff": { "url": "https://{}/admin/lib/tariff", - "cache": 10, + "cache": 300, "installer_required": False, "optional": True, },