1
0
mirror of https://github.com/home-assistant/core.git synced 2026-05-28 19:26:11 +01:00
Files
core/homeassistant/components/switch/significant_change.py
2026-04-30 21:14:48 +02:00

19 lines
408 B
Python

"""Helper to test significant Switch state changes."""
from typing import Any
from homeassistant.core import HomeAssistant, callback
@callback
def async_check_significant_change(
hass: HomeAssistant,
old_state: str,
old_attrs: dict,
new_state: str,
new_attrs: dict,
**kwargs: Any,
) -> bool | None:
"""Test if state significantly changed."""
return old_state != new_state