999LV / SmartVirtualThermostat

Smart Virtual Thermostat python plugin for Domoticz home automation system
MIT License
41 stars 31 forks source link

Version 0.4.13 does not work with Domoticz Beta versions #63

Closed fjumelle closed 7 months ago

fjumelle commented 7 months ago

Due to the way the version is coded in Domoticz Beta "YYYY.N (build XXX)", the plugin start fails line 135: versionminor = int(versionstr.split(".")[1]) ValueError: invalid literal for int() with base 10: '2 (build 15636)'

BTW, the check line 136 (if versionmajor >= 2023 and versionminor >= 2) will not work for 2024.1 :)

feelingwalnut commented 7 months ago

changing line 135 to versionminor = int(versionstr.split(".")[0]) removes the error. not sure if it is actually working but no errors in log, still learning this stuff. (don't take advise from someone still trying to figure out where to insert desired room temperature)

999LV commented 7 months ago

Corrected the code in version 0.4.14, https://github.com/999LV/SmartVirtualThermostat/commit/b539be5dec499d480d345039cea17a2545c6305a Thanks @fjumelle

fjumelle commented 7 months ago

Still NOK as version = float(versionstr.split(".")[0]) will return 2023.0 while I have "2023.2 (build XXX)". version = float(versionstr.split(" ")[0]) with a space instead of a dot will do the job, for official "2023.2" and for beta "2023.2 (build xxxx)".

999LV commented 7 months ago

You are correct. I pushed the wrong file. Should be a space indeed