New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing vertical (and horizontal in general) swing mode steps #33
Comments
You'll want to fiddle around with the advanced options that were recently added in the 2.x release. In particular:
|
After digging around in the code for this component, and ESPHome's climate component code, there's no way in Esphome to get granular on the horizontal vane position. There is a way however to say you want either horizontal swing, vertical swing, or both swing, but the HORIZONTAL and BOTH modes [aren't currently supported] (https://github.com/geoffdavis/esphome-mitsubishiheatpump/blob/master/components/mitsubishi_heatpump/espmhp.cpp#L222) in this custom component. I'm happy to try and add support for HORIZONTAL and BOTH, but I have no way to test it as my equipment doesn't support it. |
Further research shows that the esphome protocol doesn't support sending custom climate modes to home assistant either, per https://github.com/esphome/esphome/blob/dev/esphome/components/api/api.proto Any fine-grained swing mode control will require multiple changes in at least the ESPHome code base in order to support either custom swing modes or separate horizontal and vertical swing modes. |
Hi, I also have an MFZ-KT25VG floor unit with a differet vane behaviour that could be tested. Do you know how ask esphome dev team to add granular vane position? Could be possible to add some positions in a separate switch? Great job! |
Hi, |
If esphome/esphome#1998 gets merged then there will be an easy template for your codebase to do this, with esphome/esphome@531f5f7, climate_ir.h will have a function to set supported swing modes. climate:
- platform: panasonic
name: "Lounge AC"
supports_horizontal_swing: true |
I don't know how to test with a development version of esphome. Also, I think that we need the code in this library too in order to can test hvac with esphome, right? |
I have equipment that would work with the vane positions and I am interested in getting this feature implemented. It's been a while since this discussion happened. What's the current state of this? I might be able to help. |
My ac also supports horizontal and vertical swing if, you need to test something feel free to reach me. |
@kalosbg I asked about this on the developers channel on the ESPHome discord. It seems that the way that the mitsubishi units work doesn't fit in with the model of how Home Assistant (and by extension ESPHome) think about |
Thank you for the feedback back!
…On Thu, Dec 2, 2021, 16:30 Jonathan ***@***.***> wrote:
@kalosbg <https://github.com/kalosbg> I asked about this on the
developers channel on the ESPHome discord. It seems that the way that the
mitsubishi units work doesn't fit in with the model of how Home Assistant
(and by extension ESPHome) think about climate devices. So it's unlikely
that full support will be added for our devices any time soon. I intend to
make a custom controller that can be used by ESPHome that doesn't concern
itself with implementing a climate device and instead is completely
custom. I'll share it and post back here if I'm able to make that happen in
my spare time.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFPOS3SL5QLYFKIMZY2VA43UO57GRANCNFSM46NJ5QXQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I did not dig into HA internals yet, but Mitsubishi cloud integration somehow manages to expose horizontal/vertical vanes, see: https://www.home-assistant.io/integrations/melcloud/#climate It does it via ... attributes? Which are apparently custom attributes (e.g. not defined by climate device class). And on a second look, climate defines very few attributes, and instead uses properties + service setters. Which is different in HA and mightily confusing! (offtopic: anybody has a link that explains the difference and motivations?) But anyway, we can do the same and expose attributes for everything that climate misses? |
A pre-work thought on this - I can’t think of a way in ESPHOME to set
additional attributes on a particular device, but it’s been a while since
I’ve dug into the internals. We can however provide the additional settings
as a second or third device and register it as a “cover” in Home Assistant.
If someone with more time and available brain cells wants to take a stab at
this, or knows of a better solution for adding attributes to a device, let
me know.
…On Thu, Dec 2, 2021 at 11:36 Kirill Zakharenko ***@***.***> wrote:
I did not dig into HA internals yet, but Mitsubishi cloud integration
somehow manages to expose horizontal/vertical vanes, see:
https://www.home-assistant.io/integrations/melcloud/#climate
It does it via ... attributes? Which are apparently custom attributes
(e.g. not defined by climate device class). And on a second look, climate
defines very few attributes, and instead uses properties + service setters.
Which is different in HA and mightily confusing! (offtopic: anybody has a
link that explains the difference and motivations?)
But anyway, we can do the same and expose attributes for everything that
climate misses?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABDYSS7VXG67XDUB4RQSEDUO7DFNANCNFSM46NJ5QXQ>
.
|
Okay, I had a quick look @ ’api.proto’, and there is no attribute support whatsoever. If we want to implement this given existing model, my vote is on spawning a secondary ’fan’ entity for horizontally-endowed units. It has these nicely fitting oscillation and position fields, and irrelevant ones can be disabled. I may take a stab at it, but don't hold your breath, I have an attention span of a toothpick. |
Hi, I also came across this issue. However, I only have vertical position. |
Is it because in espmhp.cpp in line 221 is commented out? //const char* VANE_MAP[7] = {"AUTO", "1", "2", "3", "4", "5", "SWING"}; |
@cg089 the issue as I understand it is that the climate component in esphome can't even represent the possible states of the Mitsubishi units. See Here. The code to do it exists in the library that interacts with the heat pump units, so that part isn't particularly hard. It's just representing it within esphome in a way that isn't completely counterintuitive that is the challenge. |
No, I don't think so. I am experimenting with two Mitsubishi AC. Both are integrated in Home Assistant climate, one with this esphome here and the other with mqtt (via https://github.com/gysmo38/mitsubishi2MQTT ). While the mqtt climate is able to set all vertical positions: the esphome component only shows "Off" and "Vertical". The dropdown field however allows for more options to show in Home Assistant. Edit: Got you, I was reading climate component in home assistant, not in esphome. |
Right, that's exactly what I'm saying. It's entirely possible to control the devices fully with the c++ library that is being used under the covers of this extension. The issue is that esphome has a generic device category called "climate" which is what this package is using. The climate device type has generic options which they hoped would cover all possible climate devices that people would want to integrate into esphome. Clearly the "off" and "vertical" swing mode options don't cover the 1-5 and auto and swing plus some horizontal choices too that Mitsubishi units need to fully cover the bases. They are unlikely to add additional options into the climate device type because then they'd have to add more for every single other device that also doesn't fit, and it would start to look crazy. The choices for us are either to be limited to the options within the climate device type, or represent the options that don't fit in a different way. Here's the discussion in the esphome discord where I was told that they are unlikely to modify the esphome climate component to have all the Mitsubishi options: https://discord.com/channels/429907082951524364/912376829954891786/912379328350806066 |
Would a standalone sensor/entity at least expose the functionality? I'd be fine with some jank in the UI just to have the setting available, like a separate drop-down to choose the value. |
Yes, I think that would be the only "workaround", which would be sufficent and better than nothing. |
We could use the newish select entity in Home Assistant and ESPHome to make those options available. |
Probably worth a shot. It seems a bit cleaner than using the method described in the stepper motor documentation for esphome. |
As an interim solution, I used swing "vertical" for position 5, "horizontal" for position 2, and "both" for vertical swing. This doesn't solve the problem of controlling the horizontal position, but at least gives me the two positions i typically use, and I so rarely adjust the horizontal position that I don't mind pulling a remote out of the drawer for that. In that same branch I also overrode the fan speeds included for passing up to the climate object in home assistant, since there's no way to correctly set the order of the speeds and i didn't want 1, 2, 4, 3, quiet. I then used the simple thermostat HACS custom component to rename them |
This is awesome, I can now hack together what I want to get around HA limitations. Thanks for writing this up! |
If you or someone else wants to leverage my work, feel free! Just update your external component in esphome like so:
And, set this for your lovelace card:
|
@jcam I just wanted to say thanks! this worked great for me. It's may not be ideal for flexibility, but fits my use case well(set to one position, and leave it for the season). |
Yay! Yeah with the esphome/HA climate entity we get 4 "choices", so I decided to have auto, swing, near vertical and near horizontal, as 95% of the time that's enough. |
I've created a PR with this missing functionality if someone would like to test; #103 |
With tasmota and mqtt I can use any combination of hvac mode/fan/swing orizzontal and vertical I want. What if we use the mqtt way? Will esphome be able to use those settings from mqtt and setup the ac? |
@jcam - I'm literally only hours into my ESP journey so forgive me if I'm not understanding some of the intricacies here. What are your thoughts on setting the thermostat to the midpoint (3 or 4) every time the climate control is turned on? For the average user, this would in effect give an additional state in addition to the ones you've provided. The end user would then be able to override that selection (or employ an automation to select away from it.) |
Jumping on the bottom of this thread so sorry if I've missed an important bit but is there a list of supported options for "swing_mode:" somewhere? and did anyone manage to get vertical/horizontal vane step control working at all? |
Yeah, I kind of have the same question. I only need Vertical, but it's unclear what the individual step modes that are supported (if any). My mini-split supports Auto, 1-5, and Swing, but there doesn't seem to be any notes about what can be configured except simply ('OFF', 'VERTICAL'). |
I might try setting the ESPHome config swing_modes to the below and see if it works. I'd love to set the fan modes to something custom too as medium and middle are confusing my wife already :D Output from melcloud integration for one of my splits:
|
So forgive me for being daft but I can't see what your mod lets you do in practice? Does it allow for vertical and horizontal swings so it will swing back and forth in those directions or both when selecting swing or auto lets the device decide where to aim? If you can explain a bit I'm hoping to mod myself to allow for the stepped vane directions and eventually switches for night mode and the pollen diffusor on my model! |
Because ESPHome + homeassistant together only allow specific things to come through, and individual controls of the vanes aren't part of that, I overloaded its use so that i can choose auto + swing modes as well as stepped vane positions 2 and 5, all on the vertical. |
I've just updated my version of the esphome-mitsubishiheatpump component which is so different that I've changed the project name: |
Hey there,
thank you so much for the great integration in Home Assistant!
Currently I‘m missing the option to set the fan swing modes of my heatpump.
Mine currently supports a vertical and a horizontal direction in different steps. As I found in the original source code, there are options to customize these kind of settings:
As far as I understand, I‘m currently only able to set this setting:
swing_mode: [OFF, VERTICAL]
Is there a way to integrate these settings via HA?
The text was updated successfully, but these errors were encountered: