Repository navigation
Commit fad9c6b
authored
Fix: Handle None attributes in history data (#2869)
Fixes crash: 'NoneType' object has no attribute 'pop'
Issue: Home Assistant history data can contain entries where 'attributes'
key exists but has a None value instead of a dictionary. This causes a
crash when trying to call .pop() on it.
Solution: Changed from checking key existence ('attributes' in entry) to
using entry.get('attributes') which returns None if the key doesn't exist
or if its value is None, and only processes attributes when it's truthy.
Reported by: daryl1 parent df4a20d commit fad9c6b
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
0 commit comments