#hi i got the callender working but the

1 messages ยท Page 1 of 1 (latest)

eternal pulsar
#

layout looks similar but no, your missing a toggle for notifications and I do not recognise the line ๐Ÿ™‚

#

do you need me to share the sensor?

rapid mica
eternal pulsar
#
  - name: Garbage Collection
    state: >
      {% set t = now() %}
      {% set midnight = today_at() %}
      {% set event = state_attr('calendar.garbage_collection', 'start_time') | as_datetime | as_local %}
      {% set delta = event - midnight %}
      {% if delta.days == 0 %}
        0
      {% elif delta.days == 1 %}
        1
      {% else %}
        {{ delta.days }}
      {% endif %}
#

So as you see I have a calendar for the garbage days. For me it's once every second week.
calendar.garbage_collection

#

this is in the templates.yaml

rapid mica
#

can i do it like this?

eternal pulsar
#

is that in your canoguration.yaml? I think so

rapid mica
#

yes

eternal pulsar
#

you dont allready have any other sensors?

rapid mica
#

no template sensors but i do have some mqtt sensors

eternal pulsar
#

I gues the stup is simlar, so try it

rapid mica
#

yea it worked

#

it says the days now

#

i think it looks so weir because i don't have the font installed

#

but i don't know how to install it in ui mode

#

and when i add this line entity: "[[[ return entity.entity_id ]]]" it gives me an error ButtonCardJSTemplateError: TypeError: Cannot read properties of undefined (reading 'entity_id') in 'return entity.entity_id' i am guessing because i don't have an entity id for the button to turn the message automation on or off but i don't know how to make that

eternal pulsar
#

hmm yews I think so

#

for the font you cna jsut replace that to whatever you like really. Delete font family to have Home Assistant set the font

#

for the size, you can just write a px value. Unless you decide to use my theme

#

to add fonts in the ui you add as aresource here

rapid mica
#

Alr when i am done eating i wil try to find the font type you used and put it in the resources

eternal pulsar
#

I think this is correct

rapid mica
#

yea i added the font in the resources and it worked

eternal pulsar
#

awesome ๐Ÿ™‚

rapid mica
#

now the last thing is the button i think

#

to turn the notification on

#

or off

eternal pulsar
#

yes, just create an input boolean toggle helper for it

rapid mica
#

in my config file?

#

ah helper

#

now it does this

eternal pulsar
#

thats strange... where is the icon. Can you share yourcode?

eternal pulsar
#

I pasted your cade (and switched to my helper) and it works for me. so must be something with the helper?

rapid mica
#

this is what my helper looks like

eternal pulsar
#

is the states on and off" or are they in anoter language? german?

rapid mica
#

if it is in another language it's dutch

#

but everything is in english exept for the dagen tot de volgende ...

eternal pulsar
#

very strange

rapid mica
#

there are also some other things diffrent like the color and the rounded edges

eternal pulsar
#

yes but that comes from my theme. So check that ๐Ÿ™‚

#

if you want something else just change the card style

#
styles:
  card:
    - background: purple
    - border-radius: 0px
#

for example

#

btw, no need to use card_mod on this. Any styling can be added in styles

rapid mica
#

it was the theme

#

is it possible to force any user connected to my home assistant to use this theme or do i have to manualy enable this on any device connected?

#

or set the theme as default

eternal pulsar
#

I know I've seen other people ask the same question but have not seen the answer. Should be easy to find an answer

#

or did you mean just this? thats in the user settings

#

"profile" settings I mean

rapid mica
#

yes

#

is there another way to use a theme?

#

a way that makes the theme stay after relog?

eternal pulsar
#

I think it should? it does for me

rapid mica
#

when i go into incognito and log in it defaults to default theme

eternal pulsar
#

oh okay

rapid mica
#

but for now it works so thank you very much for helping me out

eternal pulsar
#

glad it works ๐Ÿ™‚

#

btw, I have mine set to default theme all the time.

#

try this, and then log in again in incognito

rapid mica
#

ow you can set a default them alr i wil try that out

#

yes this forced all devices to use the theme

#

thank you again

rapid mica
#

@eternal pulsar idk if its the same where you live but where i live the trash doesnt get all taken in one day the diffrent types are taken on difrent days. maybe if you want you could add a feature to the trash card and to see what kind off trash they are getting today

eternal pulsar
#

yeah I mean you could work with different colors, icon, labels.....endless possibilities really ๐Ÿ™‚ For me they collect everything at once so makes it easy for me ๐Ÿ™‚

eternal pulsar
#

a quick scetch

rapid mica
#

yea something like that

#

can you share the code?

#

but the one thing i am scare of is that this won't really have the same effect on mobile

#

since the small screen limitation

eternal pulsar
#

That was just photoshop so no code to share, but Iโ€™m sure you can figure out how to do it by using my template as a base ๐Ÿ™‚