Hi there, I am currently using the following template
template:
- sensor:
- name: "Weather Conditions"
icon: >
{{ 'mdi:'~ iif( this.state == 'exceptional', 'alert-circle',
'weather-'~this.state | replace('_', '-')) }}
state: >
{% set ns = namespace(list = []) %}
{%- for state in states.weather | groupby("state") %}
{%- set ns.list = ns.list + [(state[0], state[1] | list | count)] %}
{%- endfor %}
{{ (ns.list | sort(attribute=1, reverse=true) | first)[0] }}
attributes:
majority_condition_count: "{{states.weather | selectattr('state', 'eq', this.state) | list | count}}"
which works fine, but it does include any weather domain. I have 2 which are Astroweather and tomorrow.io and these ones should be NOT included in the template
How do I do it ?
I played around with the ‘developer tools - template’ but I am not really good in coding, please excuse. Also checked the home assistant Template info page.
Does anyone have an idea on how to explicitly specify which weather domains should be used or exclude the ones I don’t want to use