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

Idea for improved configuration of groups and devices #26

Closed
braindead1 opened this issue Jul 25, 2020 · 6 comments
Closed

Idea for improved configuration of groups and devices #26

braindead1 opened this issue Jul 25, 2020 · 6 comments
Assignees
Labels
breaking change 💥 Issue contains a breaking change feature 🌟 Feature request or enhancement

Comments

@braindead1
Copy link

Current situation:*
As of now groups are created as part of the layout. While creating devices you have to assign at least one group to the device. If you assign multiple groups, in every group the same information is used (name, states, subcategory, etc.) to render the device.

Problem:
Let's assume you want to have a tab for functions (with the groups heating, windows, blinds, etc.) and another tab for rooms (with the groups living room, dining room, kitchen, etc.). Currently on both tabs the devices are named the same (e.g. "Wohnzimmer Heizung"), whereas it would make more sense to call "Wohnzimmer Heizung" in the heating group "Wohnzimmer" and in the living room group "Heizung".

Possible solution:

  1. Create groups as part of the layout.
  2. Define devices as they are defined now without assigning groups.
  3. Assign devices to groups with the possibility to set a display name and a subcategory.
@Zefau Zefau added the feature 🌟 Feature request or enhancement label Jul 25, 2020
@Zefau Zefau self-assigned this Jul 25, 2020
@Zefau Zefau added the breaking change 💥 Issue contains a breaking change label Jul 29, 2020
@Zefau Zefau added this to the test milestone Aug 14, 2020
@Zefau
Copy link
Owner

Zefau commented Aug 15, 2020

@braindead1 thanks for your support so far. With v1.0.0-alpha.1 I introduced a BREAKING CHANGE again (sorry for that) but most likely the last one.

I dropped the "groups". Now devices are directly added to the widgets, which means, that each widget can flexibly be composed.
In this course, I added a placeholder for a possible drawer implementation (where each can have its own tabs).

Subgroups are now called groups. Groups now (as of now) are specific to StateList module. The possibility to add a group will come up, when StateList is selected.

The possibility so set an individual display name is not given so far. Furthermore, it will be possible in future to select a Button, Switch, Dropdown or whatever in the widget configuration for each device. Both will be delivered with #20 and will NOT be a breaking change.

An example for the layout structure thus is now:

[
   {
      "title":"Home",
      "icon":null,
      "tabs":[
         {
            "title":"Dashboard",
            "icon":"monitor-dashboard",
            "columns":[
               [
                  {
                     "module":"DateTime",
                     "moduleConfig":{

                     },
                     "title":"Uhrzeit",
                     "devices":[

                     ]
                  },
                  {
                     "icon":"lightbulb-group",
                     "title":"Licht",
                     "devices":[
                        {
                           "type":"group",
                           "name":"Wohnzimmer"
                        },
                        {
                           "deviceId":"light_computer"
                        },
                        {
                           "deviceId":"light_window"
                        },
                        {
                           "deviceId":"light_tv"
                        },
                        {
                           "deviceId":"light_vitrine"
                        },
                        {
                           "type":"group",
                           "name":"Schlafzimmer"
                        },
                        {
                           "type":"device",
                           "deviceId":"light_guestwc_ceiling"
                        }
                     ],
                     "module":"StateList",
                     "moduleConfig":{

                     }
                  }
               ],
               [
                  {
                     "title":"Haushalt",
                     "devices":[
                        {
                           "deviceId":"dish_washer"
                        },
                        {
                           "deviceId":"dryer"
                        },
                        {
                           "deviceId":"washing_machine"
                        },
                        {
                           "type":"divider"
                        },
                        {
                           "deviceId":"heater"
                        },
                        {
                           "type":"device",
                           "deviceId":"robot"
                        }
                     ],
                     "module":"StateList",
                     "moduleConfig":{

                     }
                  }
               ],
               [
                  {
                     "module":"StateList",
                     "title":"Familie",
                     "moduleConfig":{

                     },
                     "devices":[
                        {
                           "type":"device",
                           "deviceId":"location_home",
                           "primaryStateKey":"users"
                        },
                        {
                           "type":"divider"
                        },
                        {
                           "type":"device",
                           "deviceId":"user_zefau"
                        },
                        {
                           "type":"device",
                           "deviceId":"user_shilad"
                        }
                     ]
                  },
                  {
                     "module":"StateList",
                     "title":"Jalousien",
                     "moduleConfig":{

                     },
                     "devices":[
                        {
                           "type":"device",
                           "deviceId":"blind_balcony"
                        },
                        {
                           "type":"device",
                           "deviceId":"blind_center"
                        },
                        {
                           "type":"device",
                           "deviceId":"blind_kitchen"
                        }
                     ]
                  },
                  {
                     "module":"StateList",
                     "title":"Heizung",
                     "moduleConfig":{

                     },
                     "devices":[
                        {
                           "type":"device",
                           "deviceId":"heating_living_room"
                        },
                        {
                           "type":"device",
                           "deviceId":"heating_bathroom"
                        },
                        {
                           "type":"device",
                           "deviceId":"heating_toilet"
                        },
                        {
                           "type":"device",
                           "deviceId":"heating_bedroom"
                        },
                        {
                           "type":"device",
                           "deviceId":"heating_nursery"
                        },
                        {
                           "type":"device",
                           "deviceId":"heating_office"
                        },
                        {
                           "type":"device",
                           "deviceId":"heating_hallway"
                        },
                        {
                           "type":"device",
                           "deviceId":"controlcenter"
                        }
                     ]
                  }
               ]
            ]
         },
         {
            "title":"Map",
            "icon":"map",
            "_fullscreen":{
               "module":"Map",
               "moduleConfig":{

               },
               "title":"Karte",
               "devices":[
                  {
                     "type":"device",
                     "deviceId":"location_home",
                     "primaryStateKey":"position"
                  },
                  {
                     "type":"device",
                     "deviceId":"location_svoen"
                  },
                  {
                     "type":"device",
                     "deviceId":"user_zefau",
                     "secondaryStateKey":""
                  },
                  {
                     "type":"device",
                     "deviceId":"user_shilad",
                     "secondaryStateKey":""
                  }
               ]
            }
         },
         {
            "title":"Charts",
            "icon":"chart-line",
            "columns":[
               [
                  {
                     "module":"Chart",
                     "title":"Haushalt",
                     "moduleConfig":{

                     },
                     "devices":[
                        {
                           "type":"device",
                           "deviceId":"washing_machine",
                           "primaryStateKey":"consumption"
                        },
                        {
                           "type":"device",
                           "deviceId":"dryer",
                           "primaryStateKey":"consumption"
                        },
                        {
                           "type":"device",
                           "deviceId":"dish_washer",
                           "primaryStateKey":"consumption"
                        }
                     ]
                  }
               ],
               [
                  {
                     "module":"Chart",
                     "title":"Heizung",
                     "moduleConfig":{

                     },
                     "devices":[
                        {
                           "type":"device",
                           "deviceId":"heating_living_room"
                        },
                        {
                           "type":"device",
                           "deviceId":"heating_bathroom"
                        }
                     ]
                  }
               ]
            ]
         },
         {
            "title":"Settings",
            "icon":"cog",
            "columns":[
               [

               ],
               [
                  {
                     "module":"AdapterStatus",
                     "title":"Adapter Status",
                     "moduleConfig":{

                     },
                     "devices":[

                     ]
                  }
               ],
               [

               ]
            ]
         }
      ]
   }
]

@braindead1
Copy link
Author

I installed v1.0.0-alpha.3 and it is working as described. In my opinion this is a huge improvement! Great work so far.

Just one minor issues: After selecting a device to be included in a widget you have to click somewhere on the screen to blank out the select field.

@Zefau
Copy link
Owner

Zefau commented Aug 17, 2020

I can reproduced this and fixed it. Will be gone with the next release.

@Zefau
Copy link
Owner

Zefau commented Aug 30, 2020

@braindead1 Can you confirm this has been fixed?

@braindead1
Copy link
Author

In v1.0.0-beta.1 I can confirm that "After selecting a device to be included in a widget you have to click somewhere on the screen to blank out the select field." is gone. Additonally I can confirm that it the "Device Label" in Widgets is working as expected.

@Zefau Zefau closed this as completed Aug 30, 2020
@Zefau
Copy link
Owner

Zefau commented Sep 7, 2020

d91f2b2

@Zefau Zefau added release and removed verify-fix labels Sep 12, 2020
@Zefau Zefau removed this from the ROADMAP v1.0.0 milestone Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change 💥 Issue contains a breaking change feature 🌟 Feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants