1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-05-08 17:28:46 +01:00

Logbook: Fix for no state obj (#7191)

This commit is contained in:
Zack Barett
2020-10-02 07:57:42 -05:00
committed by GitHub
parent 93d1b9a2d5
commit cbdfaccdb2
+3 -2
View File
@@ -44,11 +44,12 @@ export const getLogbookData = async (
);
for (const entry of logbookData) {
if (entry.state) {
const stateObj = hass!.states[entry.entity_id!];
if (entry.state && stateObj) {
entry.message = getLogbookMessage(
hass,
entry.state,
hass!.states[entry.entity_id!],
stateObj,
computeDomain(entry.entity_id!)
);
}