Closed prashker closed 6 months ago
@gysmo38 I have been running this locally for about a month and haven't noticed any issues.
Not being a programmer, can someone show me/us how to implement json_attribute_template to track defrost cycles?
@mcouture87 Assuming you compiled this pull request (or this got merged in) - in my case I created a Binary Sensor in Home Assistant.
{{ state_attr('climate.hvac_mqtt', 'compressorFrequency') == 0 and state_attr('climate.hvac_mqtt', 'hvac_action') == 'heating' }}
I haven't consistently relied on this yet as it seems my HVAC has a "Heat Standby" and "Heat Defrost" and I am not sure how to identify between them.
@prashker - Ah yes, now I understand a bit better. I have compiled this pull request and have it installed on my 3 mini-splits. I'll be playing around with Home Assistant. I basically want to have it report the amount of time in "defrost mode".
Thank for the commit :)
Home Assistant's HVAC MQTT implementation allows "additional attributes" by passing a json_attribute_topic.
State topic for mitsubishi2mqtt already includes compressorFrequency so we just extract it with a json_attribute_template (output is a JSON DICT)
This mechanism can probably be used to expose
wideVane
(since HASS only seesvane
) but I have no clue what vane or wideVane is (my unit is whole home)I implemented this so I could do "defrost" tracking in Home Assistant using the steps here: https://github.com/gysmo38/mitsubishi2MQTT/issues/157#issuecomment-986175308
According to some comments, some Mitsubishi Heat Pumps do not correctly report compressorFrequency...however that seems like an upstream issue with HeatPump library (or just not possible for that model???), rather than an issue that needs to be handled in mitsubishi2mqtt - for now, at least users can see it in HASS and act on it if it's useful, and ignore it if it's not.