The following installation instructions represent (what I believe to be) the easiest way to implement this custom component, in version 0.89, without affecting any of the existing MQTT components. Please be aware that if there are changes made to the MQTT component in 0.90, or later versions, this custom component may fail to work (and require additional modifications).
Create a new directory under custom_components called my_mqtt.
config/custom_components/my_mqtt
Copy the contents of this pastebin link this pastebin link into a new file called climate.py.
config/custom_components/my_mqtt/climate.py
In configuration.yaml, find your existing MQTT climate entity and replace:
platform: mqtt
with:
platform: my_mqtt
The next step is needed ONLY if your climate entity is configured with a unique_id. If it doesn’t then skip the next two bullet-points and go directly to the Config Check step.
- Use a text editor to modify the following file:
config/.storage/core.entity_registry - Find your climate entity and replace:
"platform": "mqtt"with"platform": "my_mqtt"
Run Config Check and, if no errors are reported, restart Home Assistant.
Revised the pastebin link to the corrected version of the code.