HomeAssistant-GreeClimateComponent
HomeAssistant-GreeClimateComponent copied to clipboard
Set Horizontal Swing
Is your feature request related to a problem? Please describe. Ability to set horizontal swing would be great.
Describe the solution you'd like
As far as I know, base climate doesn't have set_horizontal_swing_mode service.
Register new handler within component should be possible?
Describe alternatives you've considered
Add set_horizontal_swing_mode to hass climate base module, and support it within component.
Additional context Constants: here - not sure if they are same for all models though. My model: ASH-13BIF2
The theory is that the swing mode dropdown consists of all swing mode options. But this will mean you get HORIZONTAL_SWING_MODES * VERTICAL_SWING_MODES number of options in that list. It's possible, but i'm not positive yet this should be the solution.
As far as i know, adding new features and dropdowns to the platform is not possible. Correct me if i'm wrong.
Source: https://developers.home-assistant.io/docs/en/entity_climate.html
Using one dropdown for both vertical and horizontal modes would be bad that's for sure.
That's why I was rather thinking about ability to call it via services (as we could create standalone dropdown using that) so far asked on discord if there's a chance to do that.
If that's not possible PR to climate module might be only solution.
I doubt such PR will be accepted though. They just rethought the whole climate component. If you look at the documentation it clearly shows that you should set all the swing modes through 1 property.
So there's one option, to register new service call for component. Apparently it's possible. As addition, there's also a way to create custom panel so everything would be covered. I can try to create PR supporting new service call, but I'm bad with js.
For now I'm leaving PR https://github.com/RobHofmann/HomeAssistant-GreeClimateComponent/pull/34 it's not yet finished, as registering a service needs finish touch. If you'll get some time please take a look at it @RobHofmann
Hi, i'm looking into your PR. I've tried to get something working. At least for it to show the service, but the service doesnt pop up in the dev tools.
When I try to manually call the service i get this:
Failed to call service climate/set_horizontal_swing_mode. Service not found.
Am I doing something wrong?
Also: where is the service.yaml placed? next to the climate.py?
Service is not injected yet, I didn't had a time to go through calls to get it working.
Afaik it should be placed next to climate.py (example)
Also i'm still wondering how this will integrate into the frontend. I doubt we can modify the existing climate frontend component. We'd probably have to build something ourselves.
Closing this for now as this is not supported by Home Assistant (yet).
@RobHofmann
Hello there,
If i see now home assistant support horizontal swing right?
https://developers.home-assistant.io/docs/core/entity/climate/#swing-modes
possible to re-investigate this?
Hey @RobHofmann ! as it's already supported by HASS could you re-open issue?
Has anyone managed to implement this? I've tried to go through the code myself, but I'm not quite following how it works.
I tried the default Gree component this week. The default Home Assistant Gree component has this feature. It allows you to swing both, vertical, horizontal or none. It however doesn't support any fixed positions.
Hello @RobHofmann
What do you think, it possible to add horizontal swing to your integration? (first time it enough that only the swing )
Hello @RobHofmann
What do you think, it possible to add horizontal swing to your integration? (first time it enough that only the swing )
I dont have any doubt it should be possible. Feel free to make a PR :).
@RobHofmann
I'm not a programmer, unfortunatelly, so i do a "workaround" in node-red.

@vampywiz17 wow I didn't know there's Gree integration for node-red, it is a usable workaround, it even has its own dashboard example. Thanks! :)
Hi, Since horizontal swing is supported by climate I can dump and decode correct JSON for every position from left to right - but I don't have developer skills to implement this into this plugin.
Are those JSON's even required to add this feature (horizontal fixed position) into this integration?
@bekon16
It also help, i think. But also no programming knowledge...
https://github.com/inwaar/node-red-contrib-gree-hvac
So, here we go all requests and answers decoded.
Request 1:
{ "opt": [ "SwingLfRig" ], "p": [ 2 ], "t": "cmd" }
Request 2:
{ "opt": [ "SwingLfRig" ], "p": [ 3 ], "t": "cmd" }
Request 3:
{ "opt": [ "SwingLfRig" ], "p": [ 4 ], "t": "cmd" }
Request 4:
{ "opt": [ "SwingLfRig" ], "p": [ 5 ], "t": "cmd" }
Request 5:
{ "opt": [ "SwingLfRig" ], "p": [ 6 ], "t": "cmd" }
Answer 1:
{ "t": "res", "mac": "xxxxx", "r": 200, "opt": [ "SwingLfRig" ], "p": [ 2 ], "val": [ 2 ] }
Answer 2:
{ "t": "res", "mac": "xxxxx", "r": 200, "opt": [ "SwingLfRig" ], "p": [ 3 ], "val": [ 3 ] }
Answer 3:
{ "t": "res", "mac": "xxxxx", "r": 200, "opt": [ "SwingLfRig" ], "p": [ 4 ], "val": [ 4 ] }
Answer 4:
{ "t": "res", "mac": "xxxxx", "r": 200, "opt": [ "SwingLfRig" ], "p": [ 5 ], "val": [ 5 ] }
Answer 5:
{ "t": "res", "mac": "xxxxx", "r": 200, "opt": [ "SwingLfRig" ], "p": [ 6 ], "val": [ 6 ] }
Hi, Is it possible to at least add function to read current position for horizontal settings? I can change: ['SwUpDn']] to ['SwingLfRig']] But i need both vertical and horizontal not only horizontal.
Can not managed it by myself.
Dear All,
Is there any change to get it integrated in one of the upcoming release? It would be great to be part of it and not use another Node-Red integration for the horizontal swing settings.
Thanks for all the great work you've made on the Gree Climate integration!
This is supported in the latest version :)