mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-24 13:27:22 +00:00
Take cover "opening" and "closing" into account (#8490)
This commit is contained in:
parent
76e0bbb55d
commit
f31f10cea9
@ -216,7 +216,6 @@ export const getLogbookMessage = (
|
||||
case "cold":
|
||||
case "gas":
|
||||
case "heat":
|
||||
case "colightld":
|
||||
case "moisture":
|
||||
case "motion":
|
||||
case "occupancy":
|
||||
@ -246,9 +245,17 @@ export const getLogbookMessage = (
|
||||
}
|
||||
|
||||
case "cover":
|
||||
return state === "open"
|
||||
? hass.localize(`${LOGBOOK_LOCALIZE_PATH}.was_opened`)
|
||||
: hass.localize(`${LOGBOOK_LOCALIZE_PATH}.was_closed`);
|
||||
switch (state) {
|
||||
case "open":
|
||||
return hass.localize(`${LOGBOOK_LOCALIZE_PATH}.was_opened`);
|
||||
case "opening":
|
||||
return hass.localize(`${LOGBOOK_LOCALIZE_PATH}.is_opening`);
|
||||
case "closing":
|
||||
return hass.localize(`${LOGBOOK_LOCALIZE_PATH}.is_closing`);
|
||||
case "closed":
|
||||
return hass.localize(`${LOGBOOK_LOCALIZE_PATH}.was_closed`);
|
||||
}
|
||||
break;
|
||||
|
||||
case "lock":
|
||||
if (state === "unlocked") {
|
||||
|
@ -311,6 +311,8 @@
|
||||
"was_disconnected": "was disconnected",
|
||||
"was_opened": "was opened",
|
||||
"was_closed": "was closed",
|
||||
"is_opening": "is opening",
|
||||
"is_closing": "is closing",
|
||||
"was_unlocked": "was unlocked",
|
||||
"was_locked": "was locked",
|
||||
"was_plugged_in": "was plugged in",
|
||||
|
Loading…
x
Reference in New Issue
Block a user