1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-24 12:49:19 +00:00

Add tamper device class for binary sensor (#10268)

This commit is contained in:
Franck Nijhof
2021-10-14 12:22:07 +02:00
committed by GitHub
parent 4ad005f0bf
commit a91d25b27d
5 changed files with 15 additions and 1 deletions

View File

@@ -279,6 +279,15 @@ export const getLogbookMessage = (
);
}
break;
case "tamper":
if (isOn) {
return hass.localize(`${LOGBOOK_LOCALIZE_PATH}.detected_tampering`);
}
if (isOff) {
return hass.localize(`${LOGBOOK_LOCALIZE_PATH}.cleared_tampering`);
}
break;
}
break;