gysmo38 / mitsubishi2MQTT

Mitsubishi to MQTT with ESP8266 module
GNU Lesser General Public License v2.1
371 stars 133 forks source link

Update HASS temp_stat_tpl min-max enforcement #192

Closed Sprinterfreak closed 1 year ago

Sprinterfreak commented 1 year ago

Allow values including min and max values instead of just greater and smaller then. Replaces ifelse by Jinja embedded min and max functions.

Fixes HASS ERROR "Could not parse temperature from" if set temp equals min or max temp.

Sprinterfreak commented 1 year ago

probably we could get rid of the surrounding ifelse by utilizing |default(" + (String)convertCelsiusToLocalUnit(22, useFahrenheit) + ")

mayankst commented 1 year ago

@Sprinterfreak how come this and your other PR has same change? image

Sprinterfreak commented 1 year ago

Convinience for the maintainer. Updated refs/master and rebased on-top of current changes to keep the log clean

Sprinterfreak commented 1 year ago

Accidentally deleted the wrong changes while preparing the second PR :(

It was difficult to work from a clean master, because to be able to test it, I needed the first PR applied for the software to actually work.

Sprinterfreak commented 1 year ago

Not so easy to prepare multiple clean PR to one file if there are multiple independent things broken which have to be fixed first in order to be able to test.