Colorado4Wheeler wrote:autolog wrote:... Ideally there should be a check on the
Cancel button or pressing
Esc that asks if you really want to do it, especially if you have done a lot of editing as it is all lost if you do a
Cancel or
Esc.
There needs to be a button to cancel a device
Edit once started, the only option is to
Add to Homekit.
When adding a new
Window Covering, the
Invert on/off state button is not shown. However, if I edit a
Window Covering added before Release 12.04, the button is shown.
That last one is a buglet only if the device is a relay and the primary method of getting info to HomeKit is the onState attribute. The reason why is that it's terribly difficult to do that reverse thing, the more I open that up the more I'm adding potential issues to the code down the road. I'll check it out though.
I have done so more testing on this. It seems that if the previous random device you edited had the
Invert on/off state button visible then if you add a new device (tested switch and window covering) the
Invert on/off state button can be set. however, if the previous device you added didn't have the
Invert on/off state button visible then it can't be set for the new device. So knowing this, I have managed to add all my curtains (window covering) with the
Invert on/off state button set.
Colorado4Wheeler wrote:As for the rest of the awesome suggestions, I'll work on it
. The cancel/esc thing is a bit tricky because that means there has to be an errorsDict dialog that then checks a box that says "next time go ahead" and if they make another change then it has to uncheck again... Tricky. Unless you have a better way you've done it in your plugins.
Don't you already do something similar in as much as if you have are editing a device and haven't added it and click save you display a message saying that you are actively editing and you should save it? I am suggesting that if you hit Cancel and have previously added items to the HomeKIt list, then you will lose them all. So all you need to do (makes it sound easy
) is to set a flag if anything in the Homekit list has changed (either deleted, added or edited) and display the message if Cancel or Esc is hit.
Colorado4Wheeler wrote:On the cancel thing I don't know if I understand why you want that. Cancel is to hit save to put it back into HomeKit, what would cancel do? Would it effectively delete it from HomeKit?
So I do an Edit and select a different device or change its Homekit name and then change my mind - I want to leave it as it was (without having to reselect the device I changed or change the name back to what I had before I changed it). So Cancel doesn't delete anything it just goes back to the state it was in before I hit the edit button. A bit like hitting CMD Z in an editor.