DJerike
(D Jerike)
August 31, 2023, 12:10pm
1
If i update to the latest version of home assistant ,on entity state change my animation does not work anymore and color does not change.
I rolled back to the prevous version and then it is working.
type: custom:mushroom-template-card
entity: switch.ithofan_auto
icon: mdi:fan-auto
icon_color: |-
{% if is_state('switch.ithofan_auto', 'on') %}
green
{% else %}
red
{% endif %}
badge_icon: mdi:fan
badge_color: teal
secondary: ''
card_mod:
style: |
{% if is_state('sensor.faninfo_sensor', 'low') %}
mushroom-badge-icon {
animation: rotation 1s linear infinite;
}
@keyframes rotation {
100% {
transform: rotate(360deg);
}
}
{% endif %}
Troon
(Troon)
August 31, 2023, 12:14pm
2
Title is missing the word “not”; and it’s also in the wrong category (Share your Projects!).
Are you certain the entities exist with the same IDs, and show the same states in the new version? Is card_mod working anywhere else in your setup? Anything in the logs?
DJerike
(D Jerike)
August 31, 2023, 12:24pm
3
Thanks, i trying to find out how i can post in the correct category.
You are correct, when i update to the newest version of HA the entity on which i state the animations states unknown.
tom_l
August 31, 2023, 12:37pm
4
Read the category descriptions.
Fixed the title and category.
DJerike
(D Jerike)
August 31, 2023, 5:08pm
5
@Troon ,
you were correct, the problem however is that when i update from HA 2023.4.6 to HA 2023.8.4 this problem starts.
in version HA2023.4.6 everything works fine, in HA 2023.8.4 the MQTT sensor says that the state is “unknown”.
Other sensors from the Itho cve unit are read fine.
Does anybody know if there is a problem with MQTT with HA2023.8.4
this is the code from my configuration.yalm:
mqtt:
sensor:
- name: "ITHO CO2"
state_topic: "itho/ithostatus"
unit_of_measurement: "ppm"
value_template: "{{ value_json['CO2level (ppm)'] }}"
- name: "Fan speed"
state_topic: "itho/ithostatus"
unit_of_measurement: "rpm"
value_template: "{{ value_json['Fan speed (rpm)'] }}"
- name: "FanInfo sensor"
state_topic: "itho/ithostatus"
unit_of_measurement: ""
value_template: "{{ value_json['FanInfo'] }}"
unique_id: "fanInfo_sensor"
i tried different changes in the code, but was unsuccesful.
Troon
(Troon)
September 1, 2023, 7:25am
6
If it’s the fan info sensor that isn’t working, and if its value is non-numeric, remove the unit_of_measurement: ""
line.
HA ha got more strict about units recently.
1 Like
N0BaDaY
(N0BaDaY)
September 8, 2023, 10:38am
8
I have encountered the same issue, and only with the automation. My icon stating the status of my washing machine does turn blue if active but is not animated. I don’t see what’s going wrong however. I read the solution above but this doesn’t seem to apply to me?
So this party works:
- type: template
entity: sensor.shelly_xl_plug_4_power
icon: mdi:washing-machine
icon_color: '{{ ''light-blue'' if states(''sensor.shelly_xl_plug_4_power'') | float > 5 }}'
card_mod: null
This part does not work (not full code but the part for one of my appliances (which all don’t get animated anymore):
mushroom-template-chip:nth-child(2)$: |
ha-icon {
{{ 'animation: shake 400ms ease-in-out infinite, drum 2s ease infinite;' if states('sensor.shelly_xl_plug_4_power') | float > 5 }}
transform-origin: 50% 110%;
}
@keyframes shake {
0%, 100% { transform: translate(0, 0) rotate(0); }
20% { transform: translate(0.4px, -0.4px) rotate(-4deg); }
40% { transform: translate(-0.4px, 0.4px) rotate(4deg); }
60% { transform: translate(0.4px, 0.4px) rotate(-4deg); }
80% { transform: translate(-0.4px, -0.4px) rotate(4deg); }
}
@keyframes drum {
50% { clip-path: polygon(0 0, 0 100%, 35% 100%, 34% 68%, 60% 41%, 71% 56%, 65% 74%, 47% 79%, 32% 69%, 35% 100%, 100% 100%, 100% 0); }
}
Anyone has any idea?
1 Like