i am using an integration that reports weather alerts. It gives the details to the alert in its attributes. I want to create a template sensor that reads the attributes…that way i can display it a number of ways…i have tried several things, but nothing is working…im sure it is very simple…still kinda new with HA… the sensor is called ‘sensor.wichita’ and the attribute is called ‘alerts’… can someone help me whip this up?..thank you
template:
- sensor:
- name: "weatheralerts.wichita"
???-not sure what to put here
???-not sure what to be here
icon: "mdi:alert-circle-outline"
is there a way to capture that attribute text and display it? I have also tried card-mod… i can adjust the font size, weight, color, padding… but not the text-align is not working… if i could align it center or left i could increase the font size…
I don’t really use card-mod for anything that doesn’t just need it installed as a requirement for a custom plug-in. I’ve never done any coding with it myself.
Hey, this is not really an answer to your question but, since you are working on a template warnings card I can suggest a better solution. I’m the author of MeteoalarmCard which supports weatheralerts integration. After downloading it you can configure it like so: