Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions src/data/logbook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ export const getLogbookMessage = (
case "cold":
case "gas":
case "heat":
case "colightld":
case "moisture":
case "motion":
case "occupancy":
Expand Down Expand Up @@ -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") {
Expand Down
2 changes: 2 additions & 0 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down