libdyson-wg / ha-dyson

Home Assistant custom integration for Wi-Fi connected Dyson devices
MIT License
208 stars 23 forks source link

Set angle for Dyson TP09 #73

Open amzaldua opened 9 months ago

amzaldua commented 9 months ago

Hello,

In version 2023.10.1 of HassIO, my Dyson TP09 integration works properly. However, I cannot set the oscillation angle. The available oscillation modes for my model are: off, 45, 90, 180 and 350 degrees.

Captura de pantalla 2023-10-10 a las 11 52 50 IMG_3578

Regards,

almostserious commented 9 months ago

Same for TP04.I wonder if these are new API calls that have not yet been implemented, or if it's not opened by Dyson. You can also manually set the direction where the fan should blow in the app.

dotvezz commented 9 months ago

It's probably possible to control the oscillation angle over MQTT! This integration is currently limited in support for this feature, but I'll do some investigation into the feasibility of adding angle control with my HP04 and HP07, then report back here with my findings.

dotvezz commented 9 months ago

Alright, that didn't take too long at all. As far as we're concerned with messages to the fan devices, this is already fully supported by libdyson-neon. We can set the oscillation range, and even set it to point in an arbitrary angle. Where this integration is limited is actually on the Home Assistant side of things. We're a bit limited by the fan entity itself, which only supports oscillation as a binary on/off feature.

But being able to set the angle is both really cool and really useful, so I'll try to work out a reasonably ergonomic that lets us do it.

EDIT: Oh, it seems Shen already thought of this to some degree: There is a set_angle service exposed by the integration that you can use in automations. It's something even though it's not easy to use. I'll keep thinking on an ergonomic solution.

almostserious commented 9 months ago

Do you have an example on how to actually use it? I always just get errors when using it: Failed to call service dyson_local.set_angle. Unknown error

If the service call works, i could imagine a custom UI element similar to how it works in the Dyson App, that just takes the amount of degrees and puts it into a service call.

Nevermind, saw in the log that it only works between 5 and 355. 180 corresponds to the Dyson Logo on the Front. Angle_High must be either equal or minimum 30 higher than angle_low. I can work with that with some automations.

Silther commented 8 months ago

We're a bit limited by the fan entity itself, which only supports oscillation as a binary on/off feature.

The best option is currently a drop down menu.

Screenshot_20231117_113119_Home Assistant.png

Some integrations use a numeric entity, but that doen't work great.

mattdevo1 commented 2 months ago

We're a bit limited by the fan entity itself, which only supports oscillation as a binary on/off feature.

The best option is currently a drop down menu.

Screenshot_20231117_113119_Home Assistant.png

Some integrations use a numeric entity, but that doen't work great.

This would be awesome.

Any thoughts on whether this could be added @dotvezz ?