Floorplan for Home Assistant

Yes, latest version from GitHub.

Good idea. I started doing some experimental work around including pre-canned SVG images into the floorplan. I guess you’d still need to create some sort of placeholder shapes to pinpoint where the ‘dynamic’ images would go. I managed to get some images to load dynamically into the floorplan, but some of the positioning was off, and I couldn’t get the images exactly where they were supposed to go.

I will revisit this when I get some more time…

How do I specify a switch that switches without the info card coming up? I’m sure it can be done but I can’t see the wood for the trees :stuck_out_tongue:

Just to test this, I reverted my HA back to normal HTTP, and got the same message. I actually get this message as soon as the HA site is loaded, before it even gets to the floorplan,

Are you not running your HA site using HTTPS?

Hi Keith. At the moment, that’s not possible, but I can add that back in again. At one point, I introduced the ability to click on an entity and have its ‘toggle’ service called. I guess I can add that back in. All you’d then need to do is specify that behaviour for your swirch, in the floorplan config, something along the lines of action: toggle as opposed to the current behaviour (which would be action: more_info) which displays the more info popup. Does that sound like what you’re after?

2 Likes

That would be great :D, this is what I need it for :smiley:

That looks cool. Nice idea!!!

Yep, works very well apart from the info cards popping up :slight_smile:

In that case, I think the floorplan should be enhanced so that you’d be able to specify (in the floorplan config) which action(s) should occur when you click on a shape in the SVG file (similar to how things already work in HA). That means you could configure a click to either trigger an automation, run a service, change a state, etc. In other words, make it flexible enough so that a click can do just about anything in HA.

1 Like

That would be brilliant :smiley:

BTW, maybe we need a new name for this? Floorplan is just one example of its use, but as we can see, it’s become more of a general purpose graphical interface into HA.

2 Likes

Possibly but I think most peeps are using it for what you designed it for, I just think outside the box sometimes :slight_smile:

1 Like

Hi Keith,

Now ready. Grab the latest file from GitHub:

ha-floorplan/www/custom_ui/floorplan/ha-floorplan.html

Then simply add the action: section to the relevant group(s) in your floorplan config. Below is just an example I used as I was testing this with my doorbell. As you can see, the action simply calls the toggle service for the entity being clicked:

        - name: Switches
          entities:
             - switch.doorbell
          states:
            - state: 'on'
              class: 'doorbell-on'
            - state: 'off'
              class: 'doorbell-off'
          action:
            service: toggle

Let me know how it goes…

2 Likes

The info cards still come up, I tried with and without a dash before service.

I’m running HA site on HTTP. No outside access except for SSH tunnel. I suppose you could argue that this makes a passphrase unnecessary, but some may still want a passphrase for LAN access.

I like the idea that suppressing some pop-up info cards. A single click to turn on a switch is much quicker. I have many switches, It takes me sometimes to turn on or turn off the switches with unnecessary clicks. If it is possible, It would be great. Thanks to you, pkozul . Thanks to you, keithh666.

2 Likes

Works great :smiley: , my remote is now functional :D, thanks for all your hard work on this :slight_smile: @pkozul

3 Likes

Thanks for letting us know. Keep the ideas rolling…

2 Likes

I suppose you could also make a rest switch to duplicate the original switch and then have one for ON/OFF and the duplicate for state card options.

I like this floorplan layout so much I may install additional tablets in my home with this as the main screen for quick & easy control & visual verification.

Eventually I will have a tinker room (once the rest of my kids move out) that this would be ideal for. Maybe even break out certain rooms to their own layout that have multiple controllable items.

1 Like

Awesome, had this idea a bit back. Now I can probably pull it off!

1 Like