Cereal2nd / velbus-aio

Velbus Asyncio
Apache License 2.0
15 stars 10 forks source link

Fix for thermostat operating mode #58

Closed DannyDeGaspari closed 1 year ago

DannyDeGaspari commented 1 year ago

Thermostat operating mode not handled correctly. The modes are : disabled, manual, automatic and sleep timer. Whenever the preset is changed (safe, night, day, comfort) the operating mode is forced to go to automatic mode. This fix retains the operating mode when the preset is changed.

@Cereal2nd, I would also like to add following parameters to be available in home assistant:

But the Climate entity does not have such properties, what would be the best way to add these parameters ? Is adding 2 extra channels to the module a good idea ? One for the operating mode and one for the program mode.

DannyDeGaspari commented 1 year ago

Does every module that supports the modulestqtusmessage2 have the sleep timer value?

I'll check for all modules that are listed in this message.

Same question for the tempsensorstatusmessage.

I did only a bug fix in here and did not add new code or functionality.

Could you write a couple of simple Testcases that implement the changes in this PR?

I'll try, but I will have to figure out how to do this for this specific message.

Cereal2nd commented 1 year ago

I deed it's only the modulestatusmessage2 that needs checking

For the tests there are some good simple examples in there, the one for the modulename is a good example and is the same idea as this one.

Cereal2nd commented 1 year ago

thanks for adding the testcases, we are almost there.

About the question in hass, i think we should do these things with extra state attributes

Cereal2nd commented 1 year ago

Thanks for the help

DannyDeGaspari commented 1 year ago

About the question in hass, i think we should do these things with extra state attributes

Does this require changes on the Hass side ? If yes, can you help here or at least guide me into it ?

BTW: during my check on the ModuleStatusMessage I noticed there is still another message variant needed for the VMBGP4PIR module. I own such a module and will implement support for it.

Cereal2nd commented 1 year ago

Yes it requires changes on the Hass side.

So what attributes exactly and how can we get these from the current channel.

If I know this it's easy.

DannyDeGaspari commented 1 year ago

There are 2 attributes:

DannyDeGaspari commented 1 year ago

@Cereal2nd, Just to let you know that I'm still continuing with further implementations of the VMBGP4PIR module, the thermostat run mode and selected program. But did not had too much spare time past week...