ich fange jetzt so langsam mit Pflanzensensoren an. Diese sind auch bereits in HA eingebunden.
Ich bin auf folgendes Video gestoßen (https://www.youtube.com/watch?v=ByWuQhDUCaA). Die Flower Card fand ich sehr ansprechend. Leider wird diese wohl in der aktuellen HA-Version nicht mehr unterstützt.
Fehlermeldung beim Hinzufügen: <Template Olen/lovelace-flower-card> Repository structure for v2025.1.0 is not compliant
hi,
ich nutze die HACS Integration gar nicht. Da habe ich mir eine Custom-button-card erstellt.
Ich brauche auch nur eine Info über die Feuchtigkeit und den Battereistand.
In der Karte gebe ich nur die Feuchtigkeitsgrenzen (Min und Max) ein und halt die benötigten Entitäten.
Hier mal meine Karte als Beispiel:
type: custom:button-card
entity: sensor.strelitzia_augusta_feuchtigkeit
name: Strelizia Augusta
show_state: true
icon: mdi:leaf
size: 18px
custom_fields:
batt: |
[[[
const level = parseFloat(states['sensor.strelitzia_augusta_batterie'].state);
let icon = "mdi:battery";
let color = "orange";
if (level >= 80) {
icon = "mdi:battery";
color = "green";
} else if (level >= 50) {
icon = "mdi:battery-80";
color = "yellow";
} else if (level >= 10) {
icon = "mdi:battery-50";
color = "orange";
} else {
icon = "mdi:battery-alert";
color = "red";
}
return `<ha-icon icon="${icon}" style="width:16px;height:16px;vertical-align:middle;color:${color};"></ha-icon> ${level} %`;
]]]
styles:
grid:
- grid-template-areas: "\"i n s batt\""
- grid-template-columns: 25px 105px 50px auto
- align-items: center
- column-gap: 10px
icon:
- color: |
[[[
const val = parseFloat(states['sensor.strelitzia_augusta_feuchtigkeit'].state);
const min = 15;
const max = 60;
if (isNaN(val) || isNaN(min) || isNaN(max)) return 'var(--primary-text-color)';
if (val < min) return 'red';
else if (val > max) return 'blue';
else return 'lightgreen';
]]]
custom_fields:
batt:
- font-size: 13px
- justify-self: end
- align-self: center
name:
- font-size: 13px
- font-weight: 500
- justify-self: start
state:
- font-size: 13px
- font-weight: 400
- justify-self: end
card:
- height: 30px
- padding: 6px 10px
- border-radius: 10px
- color: white
- transition: 1.3s
tap_action:
action: none
grid_options:
columns: 12