I have some button cards. They work but changing color is not working.
When I change from high to low or low to medium the color is not change from yellow to almost transparant. When I refresh browser its good.
I would like to have just two columns where I have an entity_picture on the left side and 4 lines for sensor data on the right. I can’t get my head around the grid-system, and I don’t know even if it is possible?
I want the entity_picture to be 100% (relative to height), so if the button-card is 300 x 300 px, the left column would be 300px high and 150px wide, meaning if I had an image of 280* 130px it would fill the left column.
Do you see that all the time, or maybe only at startup? btw check the first Span, dont think that is necessary. All my custom fields on that button have only span for the variable
this code error: SyntaxError: Unexpected string in ‘return ` <…’
${entity.state} => NOT ERROR
${states[‘sensor.processor_use’].state} and {{states(‘sensor.processor_use’)}} => ERROR
{## Imitate available variables: ##}
{% set my_test_json = {
"temperature": 25,
"unit": "°C"
} %}
The temperature is {{ my_test_json.temperature }} {{ my_test_json.unit }}.
{% if is_state("sun.sun", "above_horizon") -%}
The sun rose {{ relative_time(states.sun.sun.last_changed) }} ago.
{%- else -%}
The sun will rise at {{ as_timestamp(strptime(state_attr("sun.sun", "next_rising"), "")) | timestamp_local }}.
{%- endif %}
For loop example getting entity values in the weather domain:
{% for state in states.weather -%}
{%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%}
{{ state.name | lower }} is {{state.state_with_unit}}
{%- endfor %}.