HADashBoard widget formatting

I’m having some formatting issues with my Dashboards. I can’t get binary_sensor icons to work. I can pull them from HomeAssistant if configured but if I put a manual entry in e.g.

icon_off: mdi-door
icon_on: mdi-door-open

They come up as off/on. If I set the dash global parameters to use_hass_icon: 1 it will import the icon I have in HA. This only really seems to be an issue with door and window sensors at the moment.

I can’t change the font size of the clock widget either, what am I doing wrong?

clock:
    widget_type: clock
    widget_style: "font-size: 200%;"

I also tried the following and it does nothing:

clock:
    widget_type: clock
    time_style: "font-size: 200%;"

did you try other icons for the widget?
it is possible that you try to use icons that are created after the last time MDI is updated in AD

setting font_size with % doesnt always work. try using 30px in stead of 200% (in time_style and date_style)

Yes I tried other icons and they didn’t work.

I tried what you suggested for the clock and it made no difference, I can;t seem to change anything for the clock font or color, nothing works.

clock:
    widget_type: clock
    time_style: "color: orange; font-size: 30px;"

I’ve tried to refresh, shift refresh the dashboard etc and other changes I make are changing so it’s not a caching issue.

most of the time its still a cash problem, or a browser problem.
use google chrome and check the javaconsole for errors.
if there are no errors there, try a different device, and restarting the device running AD.

do you have the compile settings in appdaemon.yaml set to 1?

It’s definitely not a cache issue, I tried Chrome, Firefox, IE and a tablet and none changed, this is my appdaemon.yaml, I don’t have anything about compile settings:

I can change the size of the weather widget no problem.

#secrets: /config/secrets.yaml
log:
  logfile: STDOUT
  errorfile: STDERR
appdaemon:
  threads: 10
  app_dir: /config/appdaemon/apps
  plugins:
    HASS:
      type: hass
      ha_url: https://MYURL.duckdns.org:8123
      ha_key: PASSWORD
hadashboard:
  dash_url: http://192.168.0.80:5050
  dash_dir: /config/appdaemon/dashboards

This is what I have at the start of my dashboard.dash files:

##
## Main arguments, all optional
##
title: Main Panel
widget_dimensions: [135, 141]
widget_size: [1, 1]
widget_margins: [5, 5]
columns: 7
global_parameters:
    use_comma: 0
    precision: 1
    use_hass_icon: 1
    namespace: default
    devices:
      media_player:
        step: 5

cash is not only in the browser but also on the device you run AD on.
did you restart that device completely?

in the hadashboard section in your appdaemon.yaml you can set 2 compile options:

  dash_compile_on_start: 1
  dash_force_compile: 1

those will force recompiling when dashboards are loaded or AD is restarted.
if changes dont take effect without those settings its good to try these settings. (restart appdaemon after changing it)

if you use use_hass_icon then icons should be the same as in HA, except for those that are not supported.
if you want to set them manual, then dont use that option.
if you lose that option and use:

icon_on: mdi-led-on

the icon should be a led. if that works and another mdi option not then you know that the icon you tried is not supported yet.

just to make sure we are not debugging an old bug:
what system do you run appdaemon on?
what is your appdaemon version?
what is your python version?
what is your device type?
what is your HA version?

cache not cash!

cash is money in your pocket.

thanks nick.
ill probably get it in my head now (allthough my brain can be very stubbern :wink: )

I tried adding the compile settings you suggested and restarting appdaemon but it didn’t do help with my clock font size issue.

#secrets: /config/secrets.yaml
log:
  logfile: STDOUT
  errorfile: STDERR
appdaemon:
  threads: 10
  app_dir: /config/appdaemon/apps
  plugins:
    HASS:
      type: hass
      ha_url: https://MYURL.duckdns.org:8123
      ha_key: PASSWORD
hadashboard:
  dash_url: http://192.168.0.80:5050
  dash_dir: /config/appdaemon/dashboards
  dash_compile_on_start: 1
  dash_force_compile: 1

On one of my dashbaords I deleted the

use_hass_icon: 1

and it defaulted to straight lines for icons instead of pulling the door icons I have set in HA. I then set:the icon_on: mdi-led-on as a test it it did not change from the straight line.

door_window_sensor_158d0001e442b3:
    widget_type: sensor
    entity: binary_sensor.door_window_sensor_158d0001e442b3
    title: Gate
    title_style: "color: white; font-size: 120%;"
    icon_on: mdi-led-on

I rebooted Appdaemon and it made no difference, I then rebooted HA and it made no difference.

just to make sure we are not debugging an old bug:

what system do you run appdaemon on? hassio
what is your appdaemon version? 1.2.0
what is your python version? How do I find this out?
what is your device type? Raspberry Pi 3 b+ (used this from memory GitHub - dale3h/hassio-installer: Hass.io Installer for Raspberry Pi 3 B+ (Raspbian Stretch Lite))
what is your HA version? 0.71.0

ok so after changing those settings my dashboards are not working properly, I have a main dashbaord and 5 other dashboards, one for cameras, sensors, I can load every dashboard individually if i got to http://192.168.0.80:5050 and select each dashboard individually but when I start on my main dashboard, click on another dashboard this works and then try go back to the main dashboard I get the "dashboard has errors or is not found blue screen)

I wish I hadn’t touched it now, why is this happening? I have tried reboots and other browsers etc

in 99% off all cases that is a yaml problem.
a dashboard is yaml so you did make an error somewhere.
the fact that you start it and see it and when you change pages and back and get an error makes me sure that you have a cashe problem.

thats why you dont see the changes you make, pages are cashed and not properly reloaded.

the best way to go is to close everything, all dashboards, HA, appdaemon, the RPI, the device you load your dashboards on, etc. everything!
then start your PC. start your browser and clear all cashe.
then start your RPI (it will probably directly startup AD, stop that directly)
create a new dashboard with just a clock and change the time and /or datestyle
startup appdaemon.
load the dashboard on the PC and then look at the log files.
most important the error log and the acceslog. (if you havent set them in appdaemon.yaml then make sure you have them set and make sure that the files are in a place where appdaemon has full control (preferably the same dir as your appdaemon.yaml)

I mentioned to you before in a PM @ReneTode that sometimes I have problems with it too. Well seem’s tonight is a night, for some reason my bluetooth stopped working on the Pi, so i rebooted it, and none of the formatting from the dash.yaml is being applied, so sounds similar to the problem @bcowell is having.

You know my setup is correct, Hassbian in its on venv, appdaemon in its own too. I am just trying to reboot it again, and see if it comes back, but its taking a awful long time, like something is stalling it. I haven’t changed anything on it in the last few days either, been waiting for the google calendar widget before I carry on.

Same thing on second reboot too. It should look like this,

but it’s coming up like this,

Let me know if there is anything I can do to help debug.

in the past i have seen some problems with the cashe files on the device running AD. (in your case the RPI)
for sure that can happen when a device is stopped and rebooted.

in your configuration directory there should be a directory “compiled”
with subdirs: javascript, html and css.
inside those sub dirs are the files that AD creates to show a dashboard.
clear those subdirs.
and always look at the access log to see if a dashboard loads and compiles as expected.

but there are also other problems. you got an entity not found error and that can mean 2 things:

  1. you changed something in HA and the entity has changed its name
  2. HA didnt startup the way it should and has an error somewhere that made that the entity isnt created.
    in this case its the mediaplayer that probably causes errors, HA tries to load it and cant set it up. that also causes that HA takes a long time to start.

so check HA for errors and restart everything again.

I was going to type ignore that error, its just my chromecast that isn’t plugged in.

I shutdown the pi, and power cycled it, and it came up and worked this time. its weird error.

HA is sometimes wierd, and for sure when you start it when not everything is up and running before it.
i also sometimes have trouble with HA just because 1 component doesnt do what its supposed to.

by the way, i dont want you to get your hopes up to soon.
at the moment i only have time for small support shortly before i go to bed.
the calendar part will have to wait at least untill after the WC soccer is over.
we show that in our small bar live on big screen and in the mean time i am renovating there. that takes up almost all my time.
just to give you a timeframe before i can get back to it.

1 Like

No problems sir, it’s all good, I am sure i’ll find other things to mess around with in the meantime :slight_smile:

1 Like