Floorplan for Home Assistant

unfortunately, not as far I know. You can do it with switches by having one switch in a group, then use the group as the other entity_id in the svg. But that’s not possible with sensors. What I do is just make the text change colour instead.
The problem is that you tell that this entity_id should change colours, but what you want is that one of them should change colours, and one of them not. You could use stroke fill instead of fill, then group them, and have just one entity_id on them (then the fill colour of the rectangle would stay the same and just the text and stroke on the rectangle change) but I haven’t testet if this works myself.

Can you help me with this:

https://community.home-assistant.io/t/template-temperature-sensor-error/49055

I don’t see what is wrong with template :rage:

I test with stroke and fill but not working.

In floorplan-css:

Change from fill to stroke like this:

.temp-high {
  fill: #00f02dff !important;
}

to:

.temp-high {
  stroke: #00f02dff !important;
}

Just change the stroke-with in inkscape to have it as thick as you want.
And group rectangle and text template, then give the group the entity_id name.

Then you get colours at both the text and the outlines of your rectangle with one entity id.

It is possible to have one main floorplan for complete apartment and then separate detailed floorplan for each room. When I click on chosen room on main floorplan I get floorplan of room? How?

@lpt2007 checkout following thread

1 Like

Thanks. I will try that.

Hi @Zepixir, is there a way to call out a service?? I would like to have separate icon to control my cover up/close/down instead of the traditional popup menu

Yes, absolutely.
The action part in floorplan.yaml control what action to take.
Like this for my zwave thermostat:

    - name: Varme Zwave
      entities:
         - switch.termostat_stue_switch_svg
      states:
        - state: 'on'
          class: 'heat-on'
        - state: 'off'
          class: 'heat-off'
      action:
        domain: switch   # This optional parameter allows you to use other services such as homeassistant.toggle like here.
        service: toggle

If the action part is missing, the pop-up info window shows up instead.

You probably want to make 3 scripts that do the actions you want, then give the entity_id of that scripts to the buttons you make in your svg-file.

1 Like

thanks for the info. i will give it a try!!

I just upgraded to HA 0.65.6 and the latest version of Floorplan. I have three floor plans set up where I used to be able to click entities to toggle input_booleans. Now all three of them are showing the more-info window instead. I have actions defined for each entity. Does anyone have any idea what could be causing this?

have you tried to go back to the old version of floorplan, to check if it’s the html-document that does it?

I’m working on my floorplan for my house, this is what I have so far. Appreciate your feedback

5 Likes

What did you use to create that svg?

I did replace ha-floorplan.html and state-card-floorplan.html with older versions but it didn’t help. What are the dates on the files you are using?

I am getting this error in Chrome when I click on the svg even though everything works.

image

Is there a fix for the double state card? Is anyone else still getting that?

I ended up changing the floorplan component to an input_text. Now it doesn’t show the more info dialog.

It looks like floorplanner.com

It is possible to have two or more svg images in floorplan? And then call them from main floorplan.svg using inkscape/object properties/interactivity/onclick with javascript??

1 Like

I’m interested in this as well.
My current solution is another svg file, custom panel for it and using weblink to switch between two. It was a quick try yesterday night. And I don’t like it at all. If someone wanted x number of images bazillion panels would flood the ui, plus using weblink opens pop up with statistic first, I have to click the link in pop up to get to the second image. Nail to the coffin is that it opens second image in new browser window.
There has to be a better way and I’ll keep trying today after work.
But if someone from grandmasters here can help, I’ll start praying for their well being each morning and night.

1 Like