Hallo zusammen,
Bin noch ein Anfänger bei Homeassistant. Ich komme bei einem Thema nicht weiter, vielleicht kann mir hier einer helfen.
Für einen Sensor habe ich 3 Zustände und je nach Zustand will ich ein anderes Symbol und Farbe. Das habe ich mit Mushroom Chip Card auch hinbekommen. Nur der Rahmen stört mich. Kann ich den ausblenden?
!
Willkommen im Forum …
Dieses Beitrag im Forum behandelt dein Problem @Jck ![]()
![]()
Moin und Herzlich Willkommen in der Community.
Probiere es vielleicht mit einem state_image wen dir der Thread oben nicht weiter hilft.
- type: image
entity: sensor.sensor
state_image:
'zustand1': local/images/zustand1.png
'zustand2': local/images/zustand2.png
'zustand2': local/images/zustand3.png
LG
Tobi
@jack
Leider war der Beitrag nicht hilfreich.
Ich poste mal meinen Code aus der Picture- Element Card.
Oder gibt es eine andere Möglichkeit außer der Mushroom Chip Card?
- type: custom:mushroom-chips-card
chips:
- type: template
entity: sensor.test_sensor
card-mod:
style: |
ha-card {
--chip-background: none
}
icon: >-
{% if is_state('sensor.test_sensor', 'Fenster geschlossen') %}
mdi:check-circle {% elif is_state('sensor.test_sensor', 'Fenster
gekippt') %} mdi:check-circle {% elif
is_state('sensor.test_sensor', 'Fenster offen') %}
mdi:alert-circle
{% else %} mdi:help-circle {% endif %}
icon_color: >-
{% if is_state('sensor.test_sensor', 'Fenster geschlossen') %}
green
{% elif is_state('sensor.test_sensor', 'Fenster gekippt') %}
orange
{% elif is_state('sensor.test_sensor', 'Fenster offen') %} red
{% else %} red {% endif %}
tap_action:
action: more-info
style:
top: 89%
left: 80%
Nachtrag:
@totow
Werde ich ausprobieren. Danke
by HarryP: Zusammenführung Doppelpost
Ich habe das bei mir mit einer ganz normalen Bild Elementkarte gemacht ohne Schnickschnack.
- type: conditional
conditions:
- entity: binary_sensor.lumi_lumi_sensor_magnet_aq2_opening_8
state: 'off'
elements:
- type: state-icon
entity: binary_sensor.lumi_lumi_sensor_magnet_aq2_opening
style:
top: 3%
left: 15%
- type: conditional
conditions:
- entity: binary_sensor.lumi_lumi_sensor_magnet_aq2_opening_8
state: 'on'
- entity: binary_sensor.lumi_lumi_sensor_magnet_aq2_opening
state: 'on'
elements:
- type: state-icon
entity: binary_sensor.lumi_lumi_sensor_magnet_aq2_opening_8
style:
top: 3%
left: 15%
Die mdi: habe ich in der jeweiligen Entität schon geändert.
Wie die Frage zu ändern gehen würde, weis ich (noch) nicht.
