I am trying to tidy up my UI and have hit a problem… how else can I show this data ?
most of that is sensors… except the bulb that is a multi colour LED and the “off” that is a reset button
also I have installed an anniversary sensor with all the dates I need to remember ( i intend to create some automations using these too) but how can I display them?
entity is
sensor.mybirthdaydate
attributes are
years: xx
date: xxxx-xx-xx
friendly_name: Birthday to remember
icon: mdi:calendar-blank
I’ve changed it to include a calendar widget since I posted that screen shot but still pretty similar.
My calendar events are sensors that I set up extracting all the data I need from Google Calendars and an ugly python program using mqtt to update HA. I needed to write this outside of HA because I also wanted drop down list showing all birthdays, holidays and the entire season of games
Anyway, to display the next events I used markdown cards. Here’s what my lovelace code looks like now:
looking to have something that will show the name of the person, how old they will be on their next birthday (in this case 43), when the birhtday is and how long untill their birthday (in this case 280 days) (pref in months, weeks and days, but days will work for now)
I thought yours would do that but now I am not so sure.
Edit: fixing typos
I’ve kinda decided that i’m going to use graphs and stuff for the other sensors that I want to display, maybe use the big number button in HACS
i wonder if I can call on your help once again, I have the following
- content: >
You have had SKY for {{ state_attr('sensor.sky', 'years') }} years in
{{ states('sensor.sky') }} days - {{ state_attr('sensor.sky', 'date')
}}
type: markdown
but how do I perform maths on this? or what language is it so I can try and search to work it out?
what i want to show in this one is how long I have had the service for in years, months and days.
This one is gonna need a little work. You need to define a sensor with a template.
Calculate the number of days between 2 events. Say 6000 days.
Then I think the formula would be along these lines: Years in integers: 6000/365 = 16 (How does leap year come in?)
Days2: 6000 - (365* 16) = 160
Weeks in integers: 8 /7 = 1 Days in integers: 8 - (7 *1) = 1
Final answer is 16 years 5 months 1 week and 1 day
I no longer have an example to share. I have changed my templates to python code with cron & MQTT For me it was easier to maintain & remember what I was doing. I’m sure others on the forum can help once you post what you have tried.