Closed alexbk66 closed 2 years ago
I assume this is for a thermostat device? Thermostat device types use different HTML to generate the grid view and it uses the device types as set in the feature. I think right now we only have one device type for the temperature. The 2 options are I see are to add more device types for more temps or a better option might be to allow the developer to specify their own HTML for the grid view.
No, it's for new AKWebIO plugin - temperature monitoring devices (2 - 4 channels)
Can you put each temp in it's own feature? The grid can display up to 5 features (status). You can assign these as important so they all display by default in the grid.
They obviously are in it's own feature. How do I assign these as important?
Ok, worked it out, thank you
One question though, how do I control the display order? Setting "EProperty.FeatureDisplayPriority" doesn't seem to work.
HsDevice.FeatureDisplayPriority comment says "This should typically be left to the user to configure" - that's great, but how/where can user configure the FeatureDisplayPriority?
I.e. I want the buttons to be at the bottom, so the CTRL device (with thee buttons) should have Priority 3 - see the "mock-up":
Edit the root device, then go to the features tab, from there you can change the display type and the priority order using the arrows or drag and dropping. Note that you are supposed to be able to set the priority from the SDK too.
Thank you @spudwebb, I didn't see this.
As I said, setting the priority from code didn't seem to work, I use hs.UpdatePropertyByRef(EProperty.FeatureDisplayPriority) - do I need to call some other Update function after that?
What parameter are you passing to UpdatePropertyByRef ? Does it throws an exception?
I just tested with the following code line and it worked:
HomeSeerSystem.UpdatePropertyByRef(999, EProperty.FeatureDisplayPriority, new List<int>() { 1000, 1001 });
where 999 is the ref of the parent device, and 1000 and 1001 are the ref of the 2 child features.
Ah, no, I just pass priority int - it's unclear what to pass, especially because the name is singular. Hmm, so if I want to set the feature priority - I can't do it inside the feature class itself. I need to do it in the root (parent)... And I need to know the complete list of children and the priority of each child. Really inconvenient...
Really inconvenient. Because if I add another child later - I need to re-arrange the whole list ;(
If my device has 2-4 temperature readings (features) - can I show them in the Grid View?