Clear Device States to avoid confusion?

Would love to have a feature to clear-out a devices' states. It often happens when switching drivers that the previous driver had states that the new one doesn't.

Now, as an advanced user, I just deal with that (even though it's un-tidy lol) , but I do still find it confusing sometimes. I imagine that a new user who gets excited cause they found out they can use a different driver for someting would be COMPLETELY confused by this orphaned data.

1 Like

What situations are you finding you need to change drivers, at least on a regular basis?

I can understand starting to use a device for the first time and working out what driver works best, but would not expect that to be more than 2-3 devices. The more likely situation I could imagine / have experience with is needing to switch devices to a new driver provided by the HE platform, such as the Advanced Zigbe CT / RGBW drivers from when I had my Hue bulbs paired to my lighting HE hub en-masse.

I guess the point of my post is.... Does this pose an issue on a regular basis for a large number of users? If yes, then all well and good.... Just wanting to put the question out there....

Don't get me wrong, a "clear-all" option may be useful for us developers as well, rather than needing to build in clean-up procedures with can be cumersome at times to work into the regular processes and detecting the state of devices and whether people have applied recent changes to cleanup attributes.... etc, etc... So not entirely against this idea... The more I write, the more I am in favour.... :slight_smile:

1 Like

Change the device type to Device and then you can clear those values and return to the proper driver.

Seems like a bit of a hack but it works.

5 Likes

Do you lose preference settings values as well?

not sure

Not about pleasing a large number of users. It's about giving a good experience to people who are advancing in their usage of the platform, and not deterring them from continuing to experiment because something doesn't seem to make sense. ("why hasnt my weather data changed?!?! I guess it's broken...stupid thing")

1 Like

Hmmm... That does make me pause to think....

But now that I read your OP, I see that you are asking for the option to reset the attributes, so a specific "button" to click in order to run this new feature? As opposed to what I have had in my mind as being a an automatic feature when you switch drivers? If it something the user consciously chooses to run, then yes, I can see how it correctly targets users who "know what they are doing" :wink: Or at least know they are choosing an option with caveats...

Sounds like I am on some kind of review board :slight_smile: I'm still supportive..... :slight_smile:

Good to know thanks!

Seems like this should kind of automatically happen when you click "configure"?

Not really. Because there are a number of drivers that don't fully populate the data when hitting configure, and only do it when changing or setting preferences.

So to add additional behavior that the configure button didn't previously do, would require a lot of driver changes.

3 Likes

Yeah I feel like it needs to be a command of it's own.... separate to the existing ones, or triggered by something else than the existing process of configure / initialize....

This is the solution.

Change to Device, clear states, configure, change to your driver, and configure again.

Some drivers will even add scheduled tasks, and changing to Device and remove scheduled tasks is the only way to get rid of them.

A change in driver does seem like a logical change to trigger a clearing of the "Current States" (attributes).... there's no guarantee they contain the same attributes.....

1 Like

As a HE user for 4 years now, I had no idea this was possible. So I'm just saying I there should be a more obvious process

3 Likes

I actually learned it fairly recently. I just happened to stumble across a post talking about it.

But the thing with the scheduled tasks I had posted about errors in my logs. Turns out it was from a driver I tried that would check the presence of a device and report if it was online or not. I got rid of that driver and opted for the generic one.

When I did I started getting those errors when someone told me to do the device thing, and clear scheduled jobs for it..

Post in question if you are curious:

It does feel like, if you are going to ask for a platform change, it needs to be a sledgehammer to the attributes setup by whatever driver preceded the current one the user selected. So if a user selects the new "Clear Current States" option, that needs to be a clear-cut choice by them to bypass any smarts or nuances of the built-in or custom drivers they have used so far.... Again, still onboard...

All my drivers clear the "State Variables" and some "Data" values during configure because, like you, the old stale info from other drivers annoys me.

Typically attributes are fine because if they are not defined on the new driver, they usually go away. If they are being stubborn I use the trick with the "Device" driver.

1 Like

That is true, HE does natively remove "Current States" attributes not covered by the current driver.

That's not what I'm observing with the Zen31 driver. If first i set it to Zoon RGBW and then set a color...I get states like "RedLevel" and "Green Level". Those dont go away after switching to Zen31 Advanced and configuring.

I think those are in the "Current States" to the right side, not the "State Variables" which is below the commands. They are supposed to go away if the driver does not have them defined, but like I said sometimes they get stuck.

I could probably add to my standard cleanup function to clear those as well, I don't remember if there is a built in function or if I would have to do a loop and clear each one.

2 Likes

If only there was something built-in you could call.... :wink:

1 Like