kamaradclimber / rte-ecowatt

A home assistant component for ecowatt api exposed by french company RTE
Apache License 2.0
65 stars 5 forks source link

Récupération données Enedis rte_ecowatt 0.6.3 #45

Closed FredWst closed 1 year ago

FredWst commented 1 year ago

Bonjour,

Voici le log debug complet de l'erreur : en fin gras italique.

2022-12-15 12:16:11.719 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration rte_ecowatt which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-12-15 12:16:15.498 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'zone', 'xiaomi_miio', 'ffmpeg', 'rfxtrx', 'cert_expiry', 'cover', 'rest', 'integration', 'group', 'input_number', 'device_automation', 'homeassistant_alerts', 'netatmo', 'image', 'lovelace', 'person', 'homekit', 'freebox', 'rte_ecowatt', 'scheduler', 'tag', 'application_credentials', 'diagnostics', 'dlna_dmr', 'history', 'heos', 'ibeacon', 'search', 'repairs', 'config', 'script', 'system_health', 'default_config', 'hue', 'dlna_dms', 'input_datetime', 'schedule', 'denonavr', 'input_boolean', 'input_text', 'signal_ecogaz', 'auth', 'daikin', 'logbook', 'scene', 'input_button', 'energy', 'device_tracker', 'braviatv', 'switch_as_x', 'hardware', 'analytics', 'radio_browser', 'sensor', 'mobile_app', 'climate', 'onboarding', 'my', 'sun', 'cast', 'automation', 'ble_monitor', 'blueprint', 'meteo_france', 'tts', 'persistent_notification', 'co2signal', 'map', 'counter', 'timer', 'trace', 'apple_tv', 'mqtt', 'media_source', 'ipp', 'hacs', 'file_upload', 'localtuya', 'input_select'}
2022-12-15 12:16:16.121 INFO (MainThread) [homeassistant.setup] Setting up rte_ecowatt
2022-12-15 12:16:16.121 INFO (MainThread) [homeassistant.setup] Setup of domain rte_ecowatt took 0.0 seconds
2022-12-15 12:16:16.146 INFO (MainThread) [custom_components.rte_ecowatt] Called async setup entry from __init__.py
2022-12-15 12:16:16.157 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.rte_ecowatt
2022-12-15 12:16:16.161 INFO (MainThread) [custom_components.rte_ecowatt.sensor] Called async setup entry
2022-12-15 12:16:16.161 INFO (MainThread) [custom_components.rte_ecowatt] Creating an ecowatt sensor, named Ecowatt level today
2022-12-15 12:16:16.161 INFO (MainThread) [custom_components.rte_ecowatt] Creating an ecowatt sensor, named Ecowatt level now
2022-12-15 12:16:16.161 INFO (MainThread) [custom_components.rte_ecowatt] Creating an ecowatt sensor, named Ecowatt level tomorrow
2022-12-15 12:16:16.161 INFO (MainThread) [custom_components.rte_ecowatt] Creating an ecowatt sensor, named Ecowatt level in 2 days
2022-12-15 12:16:16.161 INFO (MainThread) [custom_components.rte_ecowatt] Creating an ecowatt sensor, named Ecowatt level in 3 days
2022-12-15 12:16:16.161 DEBUG (MainThread) [custom_components.rte_ecowatt.sensor] All sensors have been restored properly
2022-12-15 12:16:16.161 DEBUG (MainThread) [custom_components.rte_ecowatt] Calling update method, 0 listeners subscribed
2022-12-15 12:16:16.161 DEBUG (MainThread) [custom_components.rte_ecowatt] Starting collecting data
2022-12-15 12:16:16.193 DEBUG (MainThread) [custom_components.rte_ecowatt] starting to restore sensor from previous data
2022-12-15 12:16:16.193 DEBUG (MainThread) [custom_components.rte_ecowatt] old state: {'entity_id': 'sensor.ecowatt_level_today', 'state': 'Situation normale', 'attributes': {'generation_time': '2022-12-14T23:00:00+01:00', 'period_start': '2022-12-15T00:00:00.494688+01:00', 'period_end': '2022-12-16T00:00:00.494688+01:00', 'level_code': 1, 'icon': 'mdi:check-circle', 'friendly_name': 'Ecowatt level today'}, 'last_changed': '2022-12-15T11:04:18.202406+00:00', 'last_updated': '2022-12-15T11:04:18.202406+00:00', 'context': {'id': '01GMAQ9Q0T86XQM026B8E9JFF3', 'parent_id': None, 'user_id': None}}
2022-12-15 12:16:16.193 DEBUG (MainThread) [custom_components.rte_ecowatt] Restoring state for ecowatt-level-in-0-days
2022-12-15 12:16:16.193 DEBUG (MainThread) [custom_components.rte_ecowatt] starting to restore sensor from previous data
2022-12-15 12:16:16.193 DEBUG (MainThread) [custom_components.rte_ecowatt] old state: {'entity_id': 'sensor.ecowatt_level_now', 'state': 'Situation normale', 'attributes': {'generation_time': '2022-12-14T23:00:00+01:00', 'period_start': '2022-12-15T11:00:00.495193+01:00', 'period_end': '2022-12-15T12:00:00.495193+01:00', 'level_code': 1, 'icon': 'mdi:check-circle', 'friendly_name': 'Ecowatt level now'}, 'last_changed': '2022-12-15T11:04:18.202606+00:00', 'last_updated': '2022-12-15T11:04:18.202606+00:00', 'context': {'id': '01GMAQ9Q0T849JBB8X45TP1F26', 'parent_id': None, 'user_id': None}}
2022-12-15 12:16:16.194 DEBUG (MainThread) [custom_components.rte_ecowatt] Restoring state for ecowatt-level-in-0-hours
2022-12-15 12:16:16.194 DEBUG (MainThread) [custom_components.rte_ecowatt] starting to restore sensor from previous data
2022-12-15 12:16:16.194 DEBUG (MainThread) [custom_components.rte_ecowatt] old state: {'entity_id': 'sensor.ecowatt_level_tomorrow', 'state': 'Situation normale', 'attributes': {'generation_time': '2022-12-14T23:00:00+01:00', 'period_start': '2022-12-16T00:00:00.495658+01:00', 'period_end': '2022-12-17T00:00:00.495658+01:00', 'level_code': 1, 'icon': 'mdi:check-circle', 'friendly_name': 'Ecowatt level tomorrow'}, 'last_changed': '2022-12-15T11:04:18.202766+00:00', 'last_updated': '2022-12-15T11:04:18.202766+00:00', 'context': {'id': '01GMAQ9Q0T9NWHA3Q8HFCDMZBB', 'parent_id': None, 'user_id': None}}
2022-12-15 12:16:16.194 DEBUG (MainThread) [custom_components.rte_ecowatt] Restoring state for ecowatt-level-in-1-days
2022-12-15 12:16:16.194 DEBUG (MainThread) [custom_components.rte_ecowatt] starting to restore sensor from previous data
2022-12-15 12:16:16.194 DEBUG (MainThread) [custom_components.rte_ecowatt] old state: {'entity_id': 'sensor.ecowatt_level_in_2_days', 'state': 'Situation normale', 'attributes': {'generation_time': '2022-12-14T23:00:00+01:00', 'period_start': '2022-12-17T00:00:00.495746+01:00', 'period_end': '2022-12-18T00:00:00.495746+01:00', 'level_code': 1, 'icon': 'mdi:check-circle', 'friendly_name': 'Ecowatt level in 2 days'}, 'last_changed': '2022-12-15T11:04:18.202923+00:00', 'last_updated': '2022-12-15T11:04:18.202923+00:00', 'context': {'id': '01GMAQ9Q0TMHKB1ERDZ4PM3WC9', 'parent_id': None, 'user_id': None}}
2022-12-15 12:16:16.194 DEBUG (MainThread) [custom_components.rte_ecowatt] Restoring state for ecowatt-level-in-2-days
2022-12-15 12:16:16.194 DEBUG (MainThread) [custom_components.rte_ecowatt] starting to restore sensor from previous data
2022-12-15 12:16:16.194 DEBUG (MainThread) [custom_components.rte_ecowatt] old state: {'entity_id': 'sensor.ecowatt_level_in_3_days', 'state': 'Situation normale', 'attributes': {'generation_time': '2022-12-14T23:00:00+01:00', 'period_start': '2022-12-18T00:00:00.495814+01:00', 'period_end': '2022-12-19T00:00:00.495814+01:00', 'level_code': 1, 'icon': 'mdi:check-circle', 'friendly_name': 'Ecowatt level in 3 days'}, 'last_changed': '2022-12-15T11:04:18.203073+00:00', 'last_updated': '2022-12-15T11:04:18.203073+00:00', 'context': {'id': '01GMAQ9Q0V5ANH0X7PETDFRNW7', 'parent_id': None, 'user_id': None}}
2022-12-15 12:16:16.194 DEBUG (MainThread) [custom_components.rte_ecowatt] Restoring state for ecowatt-level-in-3-days
2022-12-15 12:16:16.194 DEBUG (MainThread) [custom_components.rte_ecowatt] starting to restore sensor from previous data
2022-12-15 12:16:16.194 DEBUG (MainThread) [custom_components.rte_ecowatt] old state: {'entity_id': 'sensor.electricity_distributor', 'state': 'unknown', 'attributes': {'friendly_name': 'Electricity distributor'}, 'last_changed': '2022-12-15T11:04:18.203246+00:00', 'last_updated': '2022-12-15T11:04:18.203246+00:00', 'context': {'id': '01GMAQ9Q0VWWEPH8RSC70J76PH', 'parent_id': None, 'user_id': None}}
2022-12-15 12:16:16.194 DEBUG (MainThread) [custom_components.rte_ecowatt] Stored state was 'unknown', starting from scratch
2022-12-15 12:16:16.195 DEBUG (MainThread) [custom_components.rte_ecowatt] starting to restore sensor from previous data
2022-12-15 12:16:16.195 DEBUG (MainThread) [custom_components.rte_ecowatt] old state: {'entity_id': 'sensor.detected_address', 'state': 'unknown', 'attributes': {'friendly_name': 'Detected address'}, 'last_changed': '2022-12-15T11:04:18.203409+00:00', 'last_updated': '2022-12-15T11:04:18.203409+00:00', 'context': {'id': '01GMAQ9Q0VRQV3CVG9Z5RPSY8A', 'parent_id': None, 'user_id': None}}
2022-12-15 12:16:16.195 DEBUG (MainThread) [custom_components.rte_ecowatt] Stored state was 'unknown', starting from scratch
2022-12-15 12:16:16.221 INFO (MainThread) [homeassistant.components.calendar] Setting up calendar.rte_ecowatt
2022-12-15 12:16:16.226 INFO (MainThread) [custom_components.rte_ecowatt.calendar] Called async setup entry for calendar
2022-12-15 12:16:16.226 INFO (MainThread) [custom_components.rte_ecowatt.calendar] We finished the setup of ecowatt *calendar*
2022-12-15 12:16:17.968 DEBUG (MainThread) [custom_components.rte_ecowatt] Fetched token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJtZWdhY2FjaGUiLCJzdWIiOiJhcGlfcmVxdWVzdCIsImlhdCI6IjIwMjItMTItMTVUMTE6MTY6MTYuODA3WiIsImV4cCI6IjIwMjItMTItMTVUMTE6MjI6MTYuODA3WiJ9.KoUfuMtOKXI7ZGNYrCg1Y9t7FH4sQBdpyd0IJyfCBVQ from enedis api
_**2022-12-15 12:16:19.286 DEBUG (MainThread) [custom_components.rte_ecowatt] Data received from api-adresse.data.gouv.fr: {'type': 'FeatureCollection', 'version': 'draft', 'features': [{'type': 'Feature', 'geometry': {'type': 'Point', 'coordinates': [4.954591, 48.803923]}, 'properties': {'label': 'Contrisson', 'score': 0.9999999696197562, 'id': '55125', 'type': 'municipality', 'name': 'Contrisson', 'postcode': '55800', 'citycode': '55125', 'x': 843545.98, 'y': 6857759.72, 'population': 797, 'city': 'Contrisson', 'context': '55, Meuse, Grand Est', 'importance': 0.2793, 'distance': 8}}], 'attribution': 'BAN', 'licence': 'ETALAB-2.0', 'limit': 1}
2022-12-15 12:16:19.286 DEBUG (MainThread) [custom_components.rte_ecowatt] Finished fetching enedis api data in 3.125 seconds (success: False)
2022-12-15 12:16:19.286 DEBUG (MainThread) [custom_components.rte_ecowatt] Last coordinator failed, assuming state has not changed
2022-12-15 12:16:19.286 DEBUG (MainThread) [custom_components.rte_ecowatt] Last coordinator failed, assuming state has not changed
2022-12-15 12:16:19.286 DEBUG (MainThread) [custom_components.rte_ecowatt] Last coordinator failed, assuming state has not changed
2022-12-15 12:16:19.286 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up rte_ecowatt platform for sensor**_
File "/config/custom_components/rte_ecowatt/__init__.py", line 567, in update_method
File "/config/custom_components/rte_ecowatt/__init__.py", line 528, in fetch_street_and_insee_code
File "/config/custom_components/rte_ecowatt/__init__.py", line 593, in update_method
File "/config/custom_components/rte_ecowatt/sensor.py", line 92, in async_setup_entry
kamaradclimber commented 1 year ago

https://github.com/kamaradclimber/rte-ecowatt/releases/tag/0.6.4 devrait aider, merci d'avoir pris le temps de reporter le problème.