DD - Automatic area-based dashboard for desktop, tablet and mobile - V3.7.0

Hello, I am rather new to HM, but I got it running without too many problems (none yaml-mode). Now I am working on the visualization, and I found your theme to be very nice! Thank you for all your work in this!
It works fine except one side effect, that I could not solve so far:
Next to Dwains Theme I do have some other Dashboards to play around with. Some of them use HACS additions also to generate custom cards / views.
The problem seems to be, that since installing Dwains Theme these do not work anymore: HACS is showing, that most of the installed additions (Frontend) are not be loaded properly in Lovelace, but not all of them. I think I have tracked it down to the yaml-mode for Lovelace that is activated by Dwains Theme in dwains_theme_configuration.yaml (in packages).
Commenting this line out solves the problem for standard Lovelace but Dwains Theme does not work anymore.
So far I could not solve this, can you give me a hint?
BTW: Is the More page or Dynamic page the right place to include special customized cards?

I have this fixed in my installation. Although not advised, you can edit these two files with the contents of my gists (make sure to remove the top lines. they just make sure you put them in the correct files.):

dwains-theme/views/main/devices/media_players.yaml
dwains-theme/views/main/rooms/room/media_players.yaml

1 Like

How are you handling the zone cleanup with vacuum?
Usually we have scripts to be called and they can be used on the vacuum card.

Is there any way to put “generic” buttons on the rooms to call scripts?

1 Like

You can set the mode to yaml in the config file then add all resources by hand in UI (from main.yaml resources folder)

I will add this in a future release, for now maybe look at the vacuum addon on my community addons repository: GitHub - dwainscheeren/dwains-dashboard-addons: Dwains Dashboard Community Addons

Really love the theme! I do have one weird issue. On my Iphone (works fine in browser and Ipad) I get a weather entity error (I use Darksky).

image

Any thoughts?

Again, computer or Ipad it works fine:

1 Like

First I want to mention that I really love the theme! Was looking for something simple because I don’t have the time to code and design.

Now I encountered a little error. I’ve created an add-on page for my garbage collector. I want to use some markdown cards to show the information I needed. I’m using this card:

- type: horizontal-stack
  cards:
    - type: markdown
      content: |
        <ha-icon icon="mdi:trash-can"></ha-icon>
        # Papier
        ### {{ states.sensor.papier.attributes.days.state }} dagen
    - type: markdown      
      content: |
        <ha-icon icon="mdi:trash-can"></ha-icon>
        # Plastic
        ### {{ states.sensor.plastic.attributes.days.state }} dagen
    - type: markdown
      content: |
        <ha-icon icon="mdi:trash-can"></ha-icon>
        # GFT
        ### {{ states.sensor.gft.attributes.days.state }} dagen

First thing i’ve noticed is that the add-on page is an vertical-stack card on its own. So I added the " - " before the “type: horizontal-stack”. Now this card works fine outside this theme.

Inside this theme, so in garbage add-on page, it isn’t working. When I add it to the page, Its says Unknown Error when loading lovelace and the loggin says this:

Logger: homeassistant.components.websocket_api.http.connection.23210961561552
Source: dwains-theme/addons/more_page/garbage/page.yaml:9
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 8:30:26 PM (1 occurrences)
Last logged: 8:30:26 PM

Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 21, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/lovelace/websocket.py", line 30, in send_with_error_handling
    result = await func(hass, connection, msg, config)
  File "/usr/src/homeassistant/homeassistant/components/lovelace/websocket.py", line 72, in websocket_lovelace_config
    return await config.async_load(msg["force"])
  File "/usr/src/homeassistant/homeassistant/components/lovelace/dashboard.py", line 186, in async_load
    self._load_config, force
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/lovelace/dashboard.py", line 204, in _load_config
    config = load_yaml(self.path)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 61, in load_yaml
    return yaml.load(conf_file, Loader=SafeLineLoader) or OrderedDict()
  File "/usr/local/lib/python3.7/site-packages/yaml/__init__.py", line 114, in load
    return loader.get_single_data()
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 51, in get_single_data
    return self.construct_document(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 55, in construct_document
    data = self.construct_object(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 192, in _ordered_dict
    nodes = loader.construct_pairs(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 183, in _include_dir_merge_list_yaml
    loaded_yaml = load_yaml(fname)
  File "/config/custom_components/dwains_theme/__init__.py", line 159, in load_yaml
    return loader.yaml.load(stream, Loader=loader.SafeLineLoader) or OrderedDict()
  File "/usr/local/lib/python3.7/site-packages/yaml/__init__.py", line 114, in load
    return loader.get_single_data()
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 51, in get_single_data
    return self.construct_document(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 55, in construct_document
    data = self.construct_object(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 223, in _construct_seq
    (obj,) = loader.construct_yaml_seq(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 408, in construct_yaml_seq
    data.extend(self.construct_sequence(node))
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in construct_sequence
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in <listcomp>
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 192, in _ordered_dict
    nodes = loader.construct_pairs(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 223, in _construct_seq
    (obj,) = loader.construct_yaml_seq(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 408, in construct_yaml_seq
    data.extend(self.construct_sequence(node))
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in construct_sequence
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in <listcomp>
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 192, in _ordered_dict
    nodes = loader.construct_pairs(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 192, in _ordered_dict
    nodes = loader.construct_pairs(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 223, in _construct_seq
    (obj,) = loader.construct_yaml_seq(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 408, in construct_yaml_seq
    data.extend(self.construct_sequence(node))
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in construct_sequence
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in <listcomp>
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 192, in _ordered_dict
    nodes = loader.construct_pairs(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 192, in _ordered_dict
    nodes = loader.construct_pairs(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/config/custom_components/dwains_theme/__init__.py", line 179, in _include_yaml
    return loader._add_reference(load_yaml(fname, args), ldr, node)
  File "/config/custom_components/dwains_theme/__init__.py", line 156, in load_yaml
    "_d_t_styles": dwains_theme_styles
  File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/config/dwains-theme/addons/more_page/garbage/page.yaml", line 9, in top-level template code
    ### {{ states.sensor.papier.attributes.days.state }} dagen
  File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 471, in getattr
    return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'states' is undefined

I guess it can’t handle the way I added the sensor, but why? Is there a way to fix this?

2 Likes

Do you have the code for this, its awesome!

Dwain your theme is brilliant!

1 Like

You can find it on the Dwains Theme Addon repo

1 Like

Ahh missed that somehow. Thanks!!

1 Like

I can’t for the life of me get the person images to show.

I have the image setup for my person integration in HA and that works fine.

person.mike:
  entity_picture: '"/local/mike.png"'

In the persons.yaml config file, I first copied/pasted the path I use for person.mike and got a broken image. So I tried different variations of ’ and " and same thing. So then I thought maybe the theme doesn’t support png and saved a copy of the file as a jpg. Nothing.

Then I tried creating an images/persons folder inside the theme folder and moved the files there.

picture_path: 'dwains-theme/images/persons/mike.jpg'

Nothing. Found an example in here that didn’t have the dwains-theme in the path so tried that.

    picture_path: 'images/persons/mike.jpg'

Still nothing. This should be the simplest step and I can’t for the life of me get it to show the damn image lol

1 Like

You must put the images in a folder underneath the www folder. Ie: www/images/persons

In the configuration you set the path as /local/images/persons

You shouldnt place the images anywhere else but the www folder.

1 Like

Forgot to mention you, see my comment above.

1 Like

/local/ == /www/

And I did try it with www/mike.png as well and it didn’t work. The file is there and it works for the person integration in HA, so it’s something different within the theme that I’m missing

1 Like

I got this in my persons.yaml:

persons: 
  - name: Damian
    track: person.damian
    picture_path: 'images/persons/damian.png'

locally this is the folder: /www/images/persons

Maybe this helps?

1 Like

That did help! moved www/mike.png to www/images/persons/mike.png and used the same path you listed above and image showed right up. Thank you!

2 Likes

It’s safe to update to HA 0.112 in combination with Dwains Theme 1.4.0, make sure you update all HACS plugins to the latest version.

1 Like

After loading up this theme, in HACS I get the following:

One of the ones not loaded is the vacuum card

When trying to use that vacuum card with the vacuum addon, I get a “Custom element doesn’t exist: vacuum-card.”

Tips?

Read this to understand why this happens: https://hacs.xyz/docs/faq/status_not_loaded

I don’t think these resources are added by default. You could try to add them to the following file:

dwains-theme\resources\custom_resources-sample.yaml

Also, see: https://dwainscheeren.github.io/lovelace-dwains-theme/how-tos/custom-cards.html