HomeAssistant-GreeClimateComponent icon indicating copy to clipboard operation
HomeAssistant-GreeClimateComponent copied to clipboard

Set Horizontal Swing

Open lenisko opened this issue 6 years ago • 22 comments

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

lenisko avatar Jul 24 '19 02:07 lenisko

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

RobHofmann avatar Jul 24 '19 13:07 RobHofmann

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.

lenisko avatar Jul 24 '19 15:07 lenisko

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.

RobHofmann avatar Jul 24 '19 18:07 RobHofmann

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.

lenisko avatar Jul 24 '19 20:07 lenisko

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

lenisko avatar Jul 25 '19 12:07 lenisko

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?

RobHofmann avatar Jul 26 '19 15:07 RobHofmann

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)

lenisko avatar Jul 26 '19 17:07 lenisko

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.

RobHofmann avatar Aug 12 '19 07:08 RobHofmann

Closing this for now as this is not supported by Home Assistant (yet).

RobHofmann avatar Jan 05 '20 16:01 RobHofmann

@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?

vampywiz17 avatar Jun 28 '20 08:06 vampywiz17

Hey @RobHofmann ! as it's already supported by HASS could you re-open issue?

lenisko avatar Aug 30 '20 23:08 lenisko

Has anyone managed to implement this? I've tried to go through the code myself, but I'm not quite following how it works.

XenorPLxx avatar Apr 20 '21 11:04 XenorPLxx

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.

RobHofmann avatar May 09 '21 12:05 RobHofmann

Hello @RobHofmann

What do you think, it possible to add horizontal swing to your integration? (first time it enough that only the swing )

vampywiz17 avatar Jun 29 '21 09:06 vampywiz17

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 avatar Jun 29 '21 10:06 RobHofmann

@RobHofmann

I'm not a programmer, unfortunatelly, so i do a "workaround" in node-red.

image

vampywiz17 avatar Jun 29 '21 11:06 vampywiz17

@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! :)

XenorPLxx avatar Jun 29 '21 12:06 XenorPLxx

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 avatar Jul 08 '21 17:07 bekon16

@bekon16

It also help, i think. But also no programming knowledge...

https://github.com/inwaar/node-red-contrib-gree-hvac

vampywiz17 avatar Jul 08 '21 18:07 vampywiz17

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 ] }

bekon16 avatar Jul 08 '21 19:07 bekon16

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.

bekon16 avatar Jan 27 '22 14:01 bekon16

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!

sthevenp avatar Feb 06 '24 09:02 sthevenp

This is supported in the latest version :)

RobHofmann avatar May 13 '24 07:05 RobHofmann