HADashboard with seperate widgets

After i created Halink to make it possible to seperate pages in single dashboards there was 1 other think i would like:
seperate files for every widget i make and then a simple nice to read page to connect the widgets.

because of the fact that hadashboard is written in a language that i dont know (yet) it took me a little while.
but i got the job done.

you can save a widget like this:

<div data-id="your_entity" data-view="Haswitch" data-icon="lightbulb-o" data-title="Livingroom" data-title2="corner" data-bgcolor="#FFDD55"></div>

i saved it with the same name as my entity_id and then .erb so like switch.livingroom_corner.erb

after you have saved your widgets like that you can make your dashboard look like this:

<div class="gridster"> <!--test dashboard-->
  <ul>

    <li data-row="1" data-col="1" data-sizex="2" data-sizey="1"><%= erb :"switch.hbank" %></li>
    <li data-row="2" data-col="1" data-sizex="1" data-sizey="1"><%= erb :"input_boolean.lights%></li>
    <li data-row="2" data-col="2" data-sizex="1" data-sizey="1"><%= erb :"sensor.temperature" %></li>
    <li data-row="3" data-col="1" data-sizex="1" data-sizey="1"><%= erb :"page.kitchen" %></li>
    <li data-row="3" data-col="2" data-sizex="1" data-sizey="1"><%= erb :"page.hallway" %></li>

  </ul>
</div>

the big advantages:

  1. you get a clean view from what you are doing.
  2. you can created a lot of new dashboards very fast without thinking how to add a widget.

halink can be found here:

2 Likes

Nice work @ReneTode! But could you please post few screenshots just to visualize easier your idea? :slight_smile:

the dashboard is just exactly as the HAdashboard.
you can search the forum for other topics about HAdashboard to find several screenshots.
and you can find Hadashboard here

it is a project from @aimc
I just create small changes which make my life easier.

this is how it looks on my pc right now