Dynamically Display Lovelace Text Based on Schedule in Home Assistant

by Danny
0 comment

READING TIME: 4 MINUTES

In this guide, I’m going to show you how to dynamically display a message on your Home Assistant dashboards. This will allow you set dynamic reminders for things around the house – chores, tasks, anniversaries, etc.

The need for this arose because I am using my Chore Tracker to track my kids chores. Every time a chore is completed, a point is added. One of my kids goes to her dad’s every other week. In my chore tracker, I had a different set of points needed before she earns her allowance based on how many points she has accumulated. However, while having custom points for every other week works great, there was no “visual” way to see whether she was going to be at home this week or with her dad.

So, as you can see in the screenshot below, I created “Home Week” and “Away Week” card that displays which week she is on.

There’s probably a lot of ways to do this, but I found the simplest way was to use the Garbage Collection card. Rather than use that for garbage collection, I just changed the icons and names.

Let’s get started!


Step 1: Download and Install the Garbage Collection Integration

I have a full guide on how to setup and install this here: https://smarthomepursuits.com/how-to-setup-garbage-collection-reminder/


Step 2: Add Home & Away Week

Depending on your use case, the setup for you may vary. Since my daughter goes to her dad’s on “odd weeks” (week 1 and 3) and is at home during even weeks (2 and 4), that’s how I set mine up. However, feel free the dates according to how you plan on setting yours up.

Since I already use Garbage Collection for Trash and Recycling, I need to add another “Garbage Collection” integration for Home/Away weeks.

Configuration > Devices & Services > Add Integration > Garbage Collection.

After clicking submit, I selected every day of the week.

The entity that gets created (sensor.home_week), will display a status of Today on every even numbered week.

I then duplicated this step for week’s she is away, choosing odd-weeks instead.


Step 3: Create Conditional Card

Next, we are going to create 2 conditional cards.

Card 1 – Away Week

Add Card > Conditional.

Under the Card tab, choose Entity and find the sensor.away_week.

Under the Conditions tab, set the entity state to “Today”.

Card 2 – Home Week

Same as above, choosing the Home week entity and also setting the Condition to Today.


Step 4: Testing It Out

At this stage, if you edit the dashboard, you should see BOTH entities displayed in Lovelace like this:

But because we are using a conditional card that only displays if the state is set to today, and the garbage collection card is configured to run every other week, the result will display only one of them depending on the week.


Wrapping Up

Overall, this was a relatively simple way to dynamically display a new message in Lovelace based on a set schedule (every other week). However, there are a number of other ways to do this – using a Google Calendar, creating an automation, etc.

And there are a lot of other use cases as well. For example, you could configure a “garbage collection reminder” (even though you won’t be using it for trash) to set reminders for HVAC replacements, wedding anniversaries, oil changes, household chores, and much more.

0 comment

You may also like

Leave a Comment