mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-14 12:56:37 +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 "cold":
|
||||||
case "gas":
|
case "gas":
|
||||||
case "heat":
|
case "heat":
|
||||||
case "colightld":
|
|
||||||
case "moisture":
|
case "moisture":
|
||||||
case "motion":
|
case "motion":
|
||||||
case "occupancy":
|
case "occupancy":
|
||||||
@ -246,9 +245,17 @@ export const getLogbookMessage = (
|
|||||||
}
|
}
|
||||||
|
|
||||||
case "cover":
|
case "cover":
|
||||||
return state === "open"
|
switch (state) {
|
||||||
? hass.localize(`${LOGBOOK_LOCALIZE_PATH}.was_opened`)
|
case "open":
|
||||||
: hass.localize(`${LOGBOOK_LOCALIZE_PATH}.was_closed`);
|
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":
|
case "lock":
|
||||||
if (state === "unlocked") {
|
if (state === "unlocked") {
|
||||||
|
@ -311,6 +311,8 @@
|
|||||||
"was_disconnected": "was disconnected",
|
"was_disconnected": "was disconnected",
|
||||||
"was_opened": "was opened",
|
"was_opened": "was opened",
|
||||||
"was_closed": "was closed",
|
"was_closed": "was closed",
|
||||||
|
"is_opening": "is opening",
|
||||||
|
"is_closing": "is closing",
|
||||||
"was_unlocked": "was unlocked",
|
"was_unlocked": "was unlocked",
|
||||||
"was_locked": "was locked",
|
"was_locked": "was locked",
|
||||||
"was_plugged_in": "was plugged in",
|
"was_plugged_in": "was plugged in",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user