diff --git a/custom_components/evcc_intg/__init__.py b/custom_components/evcc_intg/__init__.py index 8fb8782..142fa69 100644 --- a/custom_components/evcc_intg/__init__.py +++ b/custom_components/evcc_intg/__init__.py @@ -1,5 +1,4 @@ import asyncio -import json import logging from datetime import datetime, timedelta from typing import Any @@ -52,23 +51,9 @@ async def async_setup(hass: HomeAssistant, config: Config): # pylint: disable=u async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry): if DOMAIN not in hass.data: value = "UNKOWN" - try: - basepath = __file__[:-11] - with open(f"{basepath}manifest.json") as f: - manifest = json.load(f) - value = manifest["version"] - except: - pass _LOGGER.info(STARTUP_MESSAGE) hass.data.setdefault(DOMAIN, {"manifest_version": value}) - # integration = await loader.async_get_integration(hass, DOMAIN) - # xxx = await translation.async_get_translations(hass, hass.config.language, "entity_component") - # _LOGGER.error(f"-> {inspect.getmembers(xxx)}") - # for platform in PLATFORMS: - # platform = await integration.async_get_platform(platform) - # _LOGGER.error(f"-> {inspect.getmembers(platform)}") - coordinator = EvccDataUpdateCoordinator(hass, config_entry) await coordinator.async_refresh() if not coordinator.last_update_success: diff --git a/custom_components/evcc_intg/manifest.json b/custom_components/evcc_intg/manifest.json index 9bb1faf..537e225 100644 --- a/custom_components/evcc_intg/manifest.json +++ b/custom_components/evcc_intg/manifest.json @@ -10,5 +10,5 @@ "iot_class": "local_polling", "issue_tracker": "https://github.com/marq24/ha-evcc/issues", "requirements": [], - "version": "2024.6.0" + "version": "2024.6.1" } diff --git a/custom_components/evcc_intg/pyevcc_ha/__init__.py b/custom_components/evcc_intg/pyevcc_ha/__init__.py index 223fda4..272f1d9 100644 --- a/custom_components/evcc_intg/pyevcc_ha/__init__.py +++ b/custom_components/evcc_intg/pyevcc_ha/__init__.py @@ -39,7 +39,7 @@ async def read_all(self) -> dict: # 1 hour = 60min * 60sec = 3600 sec # 5 min = 300 sec if self._LAST_FULL_STATE_UPDATE_TS + 300 < time(): - await self.read_all_data(); + await self.read_all_data() else: new_data = await self.read_frequent_data() if new_data is not None: diff --git a/custom_components/evcc_intg/select.py b/custom_components/evcc_intg/select.py index a77a567..f098cdf 100644 --- a/custom_components/evcc_intg/select.py +++ b/custom_components/evcc_intg/select.py @@ -113,7 +113,7 @@ def check_tag(self, is_last: bool = False): def _check_min_options(self, new_max_option: str): min_key = self.entity_id.split('.')[1].replace(Tag.MAXCURRENT.snake_case, Tag.MINCURRENT.snake_case) - _LOGGER.warning(f"CHECK_MIN {min_key} {entities_min_max_dict} {MIN_CURRENT_LIST} {entities_min_max_dict[min_key]}") + #_LOGGER.warning(f"CHECK_MIN {min_key} {entities_min_max_dict} {MIN_CURRENT_LIST} {entities_min_max_dict[min_key]}") if min_key in entities_min_max_dict: if new_max_option in MIN_CURRENT_LIST: entities_min_max_dict[min_key].options = MIN_CURRENT_LIST[:MIN_CURRENT_LIST.index(new_max_option) + 1] @@ -122,7 +122,7 @@ def _check_min_options(self, new_max_option: str): def _check_max_options(self, new_min_option: str): max_key = self.entity_id.split('.')[1].replace(Tag.MINCURRENT.snake_case, Tag.MAXCURRENT.snake_case) - _LOGGER.warning(f"CHECK_MAX {max_key} {entities_min_max_dict} {MAX_CURRENT_LIST} {entities_min_max_dict[max_key]}") + #_LOGGER.warning(f"CHECK_MAX {max_key} {entities_min_max_dict} {MAX_CURRENT_LIST} {entities_min_max_dict[max_key]}") if max_key in entities_min_max_dict: if new_min_option in MAX_CURRENT_LIST: entities_min_max_dict[max_key].options = MAX_CURRENT_LIST[MAX_CURRENT_LIST.index(new_min_option):] diff --git a/custom_components/evcc_intg/translations/de.json b/custom_components/evcc_intg/translations/de.json index 849c597..2008261 100644 --- a/custom_components/evcc_intg/translations/de.json +++ b/custom_components/evcc_intg/translations/de.json @@ -67,7 +67,7 @@ "detectvehicle": {"name": "Fahrzeugerkennung starten"} }, "number": { - "limitsoc": {"name": "Standard Ladelimit (SOC"}, + "limitsoc": {"name": "Standard Ladelimit (SOC)"}, "limitenergy": {"name": "Standard Ladelimit (Energie)"}, "enablethreshold": {"name": "Schwellwert Aktivierung"}, "disablethreshold": {"name": "Schwellwert Deaktivierung"}, @@ -246,4 +246,4 @@ "batterydischargecontrol": {"name": "Hausbatterie: Entladesperre"} } } -} \ No newline at end of file +}