ha-dualmodegeneric
ha-dualmodegeneric copied to clipboard
Workarounds for lovelace thermostat card
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.
@zacs I guess you can close this one as well since my PR #8 included the needed changes.