Showing Conditions from a Trigger, Visually

I’m new so I might not have set this up the proper way to begin with… but I’ve been super excited on my first useful automation.

It is a trigger that runs hourly,

Which then has conditions which sometimes use templates:

  • template: is the current month between April and Sept
  • time: is time between 4am and midnight
  • numeric_state: outdoor temperature within a range
  • numeric_state: indoor temperature within a range
  • numeric_state: air quality index below a constant
  • or: (numeric_state: dew point under a constant OR numeric_state: sensor below another sensor)
  • device: a fan is off

This all works beautifully and I’m really happy with it. However, I’m so excited that I find myself wanting to monitor all of these conditions individually so I can get excited for the action to kick off.

TL-DR; What is the easiest way to build these indicators into a Dashboard so I can visually see their states?

I tried using Mushroom Template, but found that it only accepts jinja, and didn’t seem to accept the conditions yaml as-is. I also know that I can convert all these conditions into sensors, but didn’t want to do that if there is a smarter and faster way.

This is the way.

@Taras and is the best way just to block a section of configuration.yaml for this? Or is there a best practice to follow where I would have create some sort of external .yaml file for this group of 7? I want to make sure I’m using best practices because I can see how after a few months I could potentially create quite the mess :slight_smile:

It’s a personal choice.

The simplest option is to configure all Template entities in configuration.yaml. The next level is to configure them in a separate file (like templates.yaml) and include this line in configuration.yaml so Home Assistant knows where to find them.

template: !include templates.yaml

I keep my Template entities in separate files.

I have a sub-directory named templates. It contains three files, each one contains the configuration of specific types of Template entities:

binary_sensor.yaml
sensor.yaml
trigger.yaml

To make Home Assistant understand where to find the configurations for Template entities, my configuration.yaml file contains this line:

template: !include_dir_merge_list templates
1 Like