mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-08-02 14:07:42 +00:00
parent
c341cda64f
commit
5f13808fb0
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user