Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.number.significant_change Namespace Reference

Functions

bool _absolute_and_relative_change (float|None old_state, float|None new_state, float absolute_change, float percentage_change)
 
bool|None async_check_significant_change (HomeAssistant hass, str old_state, dict old_attrs, str new_state, dict new_attrs, **Any kwargs)
 

Detailed Description

Helper to test significant Number state changes.

Function Documentation

◆ _absolute_and_relative_change()

bool homeassistant.components.number.significant_change._absolute_and_relative_change ( float | None  old_state,
float | None  new_state,
float  absolute_change,
float  percentage_change 
)
private

Definition at line 23 of file significant_change.py.

◆ async_check_significant_change()

bool | None homeassistant.components.number.significant_change.async_check_significant_change ( HomeAssistant  hass,
str  old_state,
dict  old_attrs,
str  new_state,
dict  new_attrs,
**Any  kwargs 
)
Test if state significantly changed.

Definition at line 35 of file significant_change.py.