pjmaenh / home-assistant-vaillant

Custom Home Assistant Component for Vaillant vSMart and Bulex/Saunier Duval MiGo
GNU General Public License v3.0
37 stars 6 forks source link

Multiple instances #14

Open ksiwy87 opened 2 years ago

ksiwy87 commented 2 years ago

Hello,

I'm using MiGo app and have a problem with adding two instances of vaillant. In the MiGo there is an option to invite a person to manage the vaillant instance. When my account was added to manage second instance then HA is unable to load any instance. image

kkoouu commented 2 years ago

I'm getting the same error currently .... and I didn't do any changes to my account ...

File "/config/custom_components/vaillant/climate.py", line 129, in hvac_action
if self.current_temperature < self.target_temperature:
TypeError: '<' not supported between instances of 'float' and 'NoneType'
kkoouu commented 2 years ago

OK I got further, added some logging .... looks like when thermostat is in Summer mode target temperature is not returned ( an interface change possibly ? ):

2021-10-06 17:20:43 ERROR (MainThread) [custom_components.vaillant.climate] curr_temp '21.7'
2021-10-06 17:20:43 ERROR (MainThread) [custom_components.vaillant.climate] target_temp 'None'

When I switch to Winter mode, component starts correctly and target temp is available:

2021-10-06 17:19:52 ERROR (MainThread) [custom_components.vaillant.climate] curr_temp '21.7'
2021-10-06 17:19:52 ERROR (MainThread) [custom_components.vaillant.climate] target_temp '19'

a workaround is to check this variable before comparison, this change to climate.py ( line 129 ) does the job:

if self.target_temperature is float and self.current_temperature < self.target_temperature:
   return CURRENT_HVAC_HEAT
return CURRENT_HVAC_IDLE
vazromju commented 2 years ago

I am going to apply the workaround :-)