Floorplan for Home Assistant

Now live in 0.55

Hi all,

Just updated the GitHub repo with some changes that are required for Floorplan to work with HA versions 0.53 and upwards. Without these changes, the floorplan will not appear as a custom state card (custom panel always worked). Two files have changed, and one has been added:

customize.yaml

Changed from this:

      custom_ui_state_card: floorplan

to this:

      custom_ui_state_card: state-card-floorplan

configuration.yaml

Added this:

	  frontend: !include frontend.html

frontend.html (new file)

Let me know how you go.

BTW, can someone test this out on an iPhone or iPad? I don’t have one handy, but was able to test this successfully using the IOS emulators here:

http://mobiletest.me/

Cheers,
Petar

3 Likes

No luck here with a custom panel on the iOS app, mobile Chrome, or in Safari on macOS.

What details can we provide to help troubleshoot this?

Chris

Is there any error information you can provide? Not sure if there is a way to see a developer console on those mobile devices…

This is what Safari on macOS is giving me in the console.

Floorplan v1.0.6 is now ready. It fixes the stylesheet loading issue (script error) on Safari, Chrome, etc. on mobile devices.

Simply grab the latest floorplan file from GitHub repo:

www/custom_ui/floorplan/ha-floorplan.html

Let me know how you go… :slight_smile:

3 Likes

floorplan v1.0.6 works again on safari (both high sierra and ios 11 on my iphone7). the state card works again, too — on all browsers, including chrome. on safari i needed to clear the cache before it worked again. thanks a lot!

2 Likes

Welcome back! I hope everything is worked out for now! Great to see you are back and instantly take action!

~Cheers

1 Like

Thank you @PhyberApex. Yep, back again. My dad is now recovering well after his stroke. My mind is now in the right place to get back to the wonderful world of floorplans… :slight_smile:

7 Likes

I get this error in my log; HA won’t start:

2017-10-17 20:09:27 ERROR (Thread-2) [homeassistant.util.yaml] mapping values are not allowed here
  in "/home/homeassistant/.homeassistant/frontend.html", line 312, column 24
2017-10-17 20:09:27 ERROR (MainThread) [homeassistant.bootstrap] Error loading /home/homeassistant/.homeassistant/configuration.yaml: mapping values are not allowed here
  in "/home/homeassistant/.homeassistant/frontend.html", line 312, column 24

line 312 in the mentioned file reads:

  <!-- blob contrib key: blob_contributors:v21:46009d083ba81ab814120f5ec16b0009 -->

it looks like a comment, can I safely delete it?

@DDK That’s a file that’s built into HA. I think your config is probably incorrect. Maybe indenting? Can you paste in your HA config that relates to frontend: and customize: ?

1 Like

wow, you’re quick :slight_smile:

I didn’t have frontend.html in my homeassistant directory. I noticed it changed in the last hours in your github, so copied it from there when i was copying the other file.

I have these relevant entries in my configuration.yaml:

homeassistant:
  # Name of the location where Home Assistant is running
  name: XXXX
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Australia/Brisbane
  customize: !include customize.yaml

# Enables the frontend
frontend: !include frontend.html

sensor: !include_dir_merge_list sensors
panel_custom: !include panel_custom.yaml
binary_sensor: !include binary_sensors.yaml

and this in the customize file:

binary_sensor.floorplan:
  custom_ui_state_card: state-card-floorplan
  config: !include floorplan.yaml

the changes I made were:

  • updated the www/custom_ui/floorplan/ha-floorplan.html file
  • added the frontend.html file
  • changed this line: custom_ui_state_card: state-card-floorplan
  • added this: frontend: !include frontend.html

@DDK What is in the frontend.html file?

@pkozul OK, i’m officially stupid :persevere: when i copied the files i did ‘right click - save as’, that saved the html file that is displaying the github pages; not your code.
So I went to the raw code, and copied that, and that fixed all those issues (at least I hope I can now prevent someone else from making this same mistake…)

But, I still have some issues:

  • It is working in Microsoft Edge
  • it is not working in Chrome, even after pressing Ctrl-F5 many times, after clearing the cache and after a reboot
  • it is not working on my ipad, not through the HA app, not in Chrome on the ipad and not in safari

If it helps you I am happy to set a temp password and send it over personal message so that you can have a look (not that i want you to be my personal help desk, but it might help you in debugging what the issue is)

Never mind, I just checked on another laptop in Chrome, and it works there. So it’s an issue on my PC, not in the code.
Still an issue on ios though.

@pkozul glad to see you’re back! and thanks for fixing the problem.

2 Likes

@sjee No problem. Can you confirm that the latest version fixes the issue on Safari? Thanks.

This is working on Mobile Safari on ipad pro 9.7 (11.0.3) and iphone 7+ (10.3.1) but not on mobile chrome. I had to uninstall and reinstall the home-assistant app to get it to work on the app.

1 Like

Hi @mdande. Is mobile Chrome displaying any error message?

@pkozul just the same Script error: See browser console for detail.