zacs / ha-dualmodegeneric

Generic thermostat capable of heating and cooling
68 stars 26 forks source link

Workarounds for lovelace thermostat card #24

Closed lossanarch closed 4 months ago

lossanarch commented 3 years ago

Alright, I've spent a few hours testing this both for range mode and non range mode, it looks like it works, although it feels pretty dirty. It sets the support flags based on whether temp low/high is configured and defaults to a single temperature setting if not.

As the original generic thermo and my update was written with the assumption that the properties would be available there is a lot of exception handling now. If there's a more pythonic way of handling the optional properties please let me know or feel free to alter. Should probably refactor to do it better but right now I'm just trying to solve the issue.

Preset mode is not currently handled and will probably throw an error in range mode.

david-kalbermatten commented 3 years ago

@zacs I guess you can close this one as well since my PR #8 included the needed changes.