Fix missing (#1402)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Adam Outler 2022-07-16 15:36:49 -04:00 committed by GitHub
parent c341cda64f
commit 5f13808fb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ This support is added by creating a `significant_change.py` platform file with a
```python
from typing import Any, Optional
from homeassistant.core import callback
from homeassistant.core import HomeAssistant, callback
@callback
def async_check_significant_change(
@ -18,7 +18,7 @@ def async_check_significant_change(
new_state: str,
new_attrs: dict,
**kwargs: Any,
) -> Optional[bool]
) -> bool | None:
```
This function is passed a state that was previously considered significant and the new state. It is not just passing the last 2 known states in. The function should return a boolean if it is significant or not, or `None` if the function doesn't know.