mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-08-03 06:27: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
|
```python
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import HomeAssistant, callback
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def async_check_significant_change(
|
def async_check_significant_change(
|
||||||
@ -18,7 +18,7 @@ def async_check_significant_change(
|
|||||||
new_state: str,
|
new_state: str,
|
||||||
new_attrs: dict,
|
new_attrs: dict,
|
||||||
**kwargs: Any,
|
**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.
|
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