Skip to content
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

Auto Mode no longer working in script - HP04 #75

Closed
xvlw opened this issue Nov 23, 2021 · 23 comments
Closed

Auto Mode no longer working in script - HP04 #75

xvlw opened this issue Nov 23, 2021 · 23 comments
Assignees
Labels
bug Something isn't working

Comments

@xvlw
Copy link

xvlw commented Nov 23, 2021

I'm a bit of a new user for Home Assistant but I had managed to coble together some easy scripts to control my Dyson HP04

Up until recently and for most of the last year this very simple script was working :

Config : https://i.imgur.com/yoNpIJk.png
Visual Editor : https://i.imgur.com/ZXHFtQZ.png

For some reason it will no longer apply the auto setting once triggered, this is happening for all my scripts.

I then tried applying the switch directly (as I had seen closed issues from middle of 2021 about a move to switches from profiles

Config : https://i.imgur.com/cfAj7wv.png
Visual Editor : https://i.imgur.com/qCAHl9K.png

To me even though taking a different route through the visual editor the config is identical for both and both are using the recommendation ( switch.pure_hot_cool_auto_mode ) from this closed ticket : #49

Am I doing something wrong? Not sure what I broke in my script, it was working for most of the year.

Any help would be appreciated

@xvlw xvlw changed the title Auto Mode no longer working in script Auto Mode no longer working in script - HP04 Nov 23, 2021
@cmatte
Copy link

cmatte commented Nov 28, 2021

Experiencing the same here, and to be more specific both auto mode and front airflow are now showing as unavailable for Dyson Pure Cool.

@pbrunier
Copy link

pbrunier commented Nov 29, 2021

I have exactly the same issue.
https://imgur.com/cAFSDu9

@Kakise Kakise self-assigned this Nov 30, 2021
@Kakise Kakise added the bug Something isn't working label Nov 30, 2021
@Kakise
Copy link
Collaborator

Kakise commented Nov 30, 2021

Thank you for the report, it's clearly a regression from 0.15, I added it to the 0.17 roadmap

@xvlw
Copy link
Author

xvlw commented Nov 30, 2021

Appreciate it.
Is there somewhere we can view the future roadmaps?

@qqaatw
Copy link

qqaatw commented Dec 7, 2021

Exactly the same issue, looking forward to the fix. Thanks.

@Leonti
Copy link

Leonti commented Dec 9, 2021

Hi!
I've just installed the integration for TP04 and there are no controls to enable auto mode or front airflow:
image
Is it the same issue?

Also, when the TP04 is in AUTO mode and I switch it off and on again it starts with the fan setting set to 2 and not with the previous setting. Is it expected or is it a separate issue?

@Flameeyes
Copy link
Contributor

Since this is mostly due to my changes that went into 0.16 — this is expected behaviour following Home Assistant best practices.

Auto mode and direction of fans is set on the control of the fan itself, rather than as separate toggle switches:

image

The fan.turn_on service provide access to the additional parameters:

image

For scenes this means that you'll have to remove and re-add the device for it to be started in the configuration you want.

@xvlw
Copy link
Author

xvlw commented Dec 12, 2021

Using this I was able to fix my scripts.

@Leonti
Copy link

Leonti commented Dec 12, 2021

I can't believe I didn't try to click the Fan entity, I just thought it was a simple toggle ☺️
All good now, thanks for looking into this @Flameeyes!

@Kakise
Copy link
Collaborator

Kakise commented Dec 15, 2021

I'll add a section in the README regarding this issue.

@Kakise Kakise closed this as completed Dec 15, 2021
@cvocvo
Copy link

cvocvo commented Dec 19, 2021

Auto mode and direction of fans is set on the control of the fan itself, rather than as separate toggle switches:

image
@Flameeyes
Is it possible to get these toggles directly in a card? (avoiding the need to click into the entity to get them)

@Flameeyes
Copy link
Contributor

You should be asking that upstream, I'm afraid.

I would generally be in favour of a "Fan" card view that would contain the settings, but I'm not sure if this is the right place to implement (particularly as we intend to merge the integration into core.)

@Kakise
Copy link
Collaborator

Kakise commented Dec 20, 2021

Auto mode and direction of fans is set on the control of the fan itself, rather than as separate toggle switches:

image @Flameeyes Is it possible to get these toggles directly in a card? (avoiding the need to click into the entity to get them)

Now that the integration is to be merged in the HA core, the best thing would be to steer away this project from these kind of features as it should become a minimal working base on which you could build upon.

@xvlw
Copy link
Author

xvlw commented Dec 22, 2021

Apologies about digging this back up, however I am still seeing a problem but now in Node Red when trying to recreate the above script.

After being able to sort out the Auto Mode I started building the automatons out in Node Red but I can't get it to trigger Auto Mode using switch.pure_hot_cool_auto_mode with fan.turn_on.

Am I missing something? It works fine using it in Home Assistant this way.

image

https://i.imgur.com/okZSg1v.png

@Flameeyes
Copy link
Contributor

Your entity should be the fan entity, since the switch entity is no longer provided.

@xvlw
Copy link
Author

xvlw commented Dec 22, 2021

Ok, I thought we moved Auto Mode to switches so that's my bad, however these are the options I get for entities using Fan. Using fan.pure_hot_cool, i get the error "Call-service error. The preset_mode auto is not a valid preset_mode: ['Auto']"

image

@Flameeyes
Copy link
Contributor

I guess it needs to be capitalized.

@xvlw
Copy link
Author

xvlw commented Dec 22, 2021

hahahaha I hate it here hahaha
Capital A worked on Auto

Thank you

@mundschenk-at
Copy link

@Flameeyes, what is the "canonical" way to disable Auto mode, other then setting a percentage speed? I wonder if modelling this as a preset is really the right way, or maybe it is, but there needs to be another preset manual (and Auto should really be auto).

@Flameeyes
Copy link
Contributor

@mundschenk-at the Home Assistant canonical way to handle this is indeed having a single Auto preset_mode and switching it off by setting a percentage.

From the documentation:

Preset modes should not include named (manual) speed settings as these should be represented as percentages.

Manually setting a speed must disable any set preset mode. If it is possible to set a percentage speed manually without disabling the preset mode, create a switch or service to represent the mode.

"Auto Mode" is not orthogonal to the speeds: if auto mode is enabled, speed control is disabled, and vice-versa. You can't have "Speed 4 + Auto Mode."

@mundschenk-at
Copy link

mundschenk-at commented Mar 22, 2022

It is, sort of, in that when you use the Dyson app or the IR remote control, the device remembers the last set speed percentage. If I switch on auto mode while speed is set to 10 (100 %), then auto will reduce speed if there are no particles etc. If you now switch off auto mode, the fan will return to full blast.

I'd like things to be consistent between HA usage and Dyson app/RC usage.

@Flameeyes
Copy link
Contributor

Yes the Dyson app/firmware have a recall-last-speed — but that is not really exposed by Home Assistant. Since the plan for this component is to be merged upstream (or at least that's what @Kakise was hoping), I'd strongly suggest keeping it compliant with Home Assistant's semantics.

You can build your own helper switch, by saving the state of the fan entity before turning the preset to Auto, and recalling it after turning it off (this does require home-assistant/core#62794 to be merged though), but I don't think that breaking the HA model to match the Dyson app is the right answer here.

@mundschenk-at
Copy link

Sure, getting the integration merged upstream would be best. OK, I see, this is one architectural purity decisions. Well, can't be helped then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants