djbulsink / panasonic_ac

Panasonic Comfort Cloud HA component
30 stars 16 forks source link

Set mode as array #10

Closed inforsgit closed 5 years ago

inforsgit commented 5 years ago

Very mysterious behaviour but as-is it seems that referencing PRESET_ECO, PRESET_NONE, PRESET_BOOST in the import causes the component not to be activated at all - no error messages but the component is just not loaded.

I don't know enough about python to properly fix it but the following code gets it working again - just converting the dict to a simple array and not using the constants.

It still doesn't actually work (i.e. doesn't change the mode) but maybe that is due to the issue in pcomfortcloud mentioned in #8

djbulsink commented 5 years ago

Hi @inforsgit ,

I merge the other pull request #9 for preset mode. I reviewed the code twice but I can't find cause of the problem you are having. I prefer to use the constants PRESET_ECO, PRESET_NONE, PRESET_BOOST because off the translations in the ui.

inforsgit commented 5 years ago

Thanks for that - I agree with you, I'd rather use the presets - let me update with your latest commits (and the updates to pcomfortcloud) and I'll see if it's all working again.