muart-group / esphome

ESPHome fork for development of the mitsubishi_uart component. Check out the documentation for more info:
https://muart-group.github.io/
10 stars 0 forks source link

Review Disabled Temperature Source Select #44

Open Sammy1Am opened 3 months ago

Sammy1Am commented 3 months ago

Currently (after #42), the temperature source select menu is disabled by skipping registering it in Python because not creating it at all causes a lot of null pointer references in the code. However, this leaves the temperature source select component in a weird state and e.g. publishing fails (and it doesn't contain "Internal" even though it should still technically contain it.

We should review the code and potentially consider adding if (temperature_source_select_) {... guards around several blocks of code to protect the runtime from any configuration errors that cause temperature_source_select_ to be missing.

I think this is unique to temperature_sourceselect, since we're not dynamically disabling any other components at this point, but might also be worth keeping an eye on when we do auto config (#13)

Sammy1Am commented 3 months ago

From #45: If only internal temperature source is available, preemptively send "Use Internal" packet to heat pump to avoid weird states.