dmslabsbr / hoymiles

Hoymiles ADD-ON for Home Assistant
127 stars 30 forks source link

Fails when there is no data yet #180

Open augustynski-lukasz opened 2 months ago

augustynski-lukasz commented 2 months ago

Addon failes on newly installed PV plant when there is no data yet.

Logs: 2024-09-20 15:25:11,945 - HoymilesAdd-on.hoymilesapi.Hoymiles - WARNING - real_power = 0 Traceback (most recent call last): File "/hoymiles.py", line 499, in sys.exit(main()) # next section explains the use of sys.exit File "/hoymiles.py", line 454, in main publicate_data(plant_list[id], mqtt_h) File "/hoymiles.py", line 263, in publicate_data hoymiles_h.get_solar_data() File "/hoymilesapi.py", line 265, in get_solar_data self.solar_data = self.adjust_solar_data(self.solar_data) File "/hoymilesapi.py", line 308, in adjust_solar_data last_data_time = datetime.strptime(last_data_time, "%Y-%m-%d %H:%M:%S") TypeError: strptime() argument 1 must be str, not None

xxLeoxx93 commented 1 month ago

Same here a month later…

Cosik commented 1 month ago

@xxLeoxx93 but it is only for fresh installation. where there is no data on the server. It will be fixed in new version.