mirror of
https://github.com/home-assistant/core.git
synced 2026-05-28 19:26:11 +01:00
d766aae436
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: frenck <195327+frenck@users.noreply.github.com>
19 lines
408 B
Python
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
|