@@ -55,6 +55,7 @@ class NodeFeature(str, Enum):
5555 RELAY_LOCK = "relay_lock"
5656 SWITCH = "switch"
5757 SENSE = "sense"
58+ SENSE_HYSTERESIS = "sense_hysteresis"
5859 TEMPERATURE = "temperature"
5960
6061
@@ -86,6 +87,7 @@ class NodeType(Enum):
8687 NodeFeature .MOTION_CONFIG ,
8788 NodeFeature .TEMPERATURE ,
8889 NodeFeature .SENSE ,
90+ NodeFeature .SENSE_HYSTERESIS ,
8991 NodeFeature .SWITCH ,
9092)
9193
@@ -260,12 +262,48 @@ class EnergyStatistics:
260262 day_production_reset : datetime | None = None
261263
262264
265+ @dataclass (frozen = True )
266+ class SenseHysteresisConfig :
267+ """Configuration of sense hysteresis switch.
268+
269+ Description: Configuration settings for sense hysteresis.
270+ When value is scheduled to be changed the returned value is the optimistic value
271+
272+ Attributes:
273+ humidity_enabled: bool | None: enable humidity hysteresis
274+ humidity_upper_bound: float | None: upper humidity switching threshold (%RH)
275+ humidity_lower_bound: float | None: lower humidity switching threshold (%RH)
276+ humidity_direction: bool | None: True = switch ON when humidity rises; False = switch OFF when humidity rises
277+ temperature_enabled: bool | None: enable temperature hysteresis
278+ temperature_upper_bound: float | None: upper temperature switching threshold (°C)
279+ temperature_lower_bound: float | None: lower temperature switching threshold (°C)
280+ temperature_direction: bool | None: True = switch ON when temperature rises; False = switch OFF when temperature rises
281+ dirty: bool: Settings changed, device update pending
282+
283+ Notes:
284+ Disabled sentinel values are hardware-specific (temperature=17099 for -1°C, humidity=2621 for -1%) and are handled in the node layer; the public API exposes floats in SI units.
285+
286+ """
287+
288+ humidity_enabled : bool | None = None
289+ humidity_upper_bound : float | None = None
290+ humidity_lower_bound : float | None = None
291+ humidity_direction : bool | None = None
292+ temperature_enabled : bool | None = None
293+ temperature_upper_bound : float | None = None
294+ temperature_lower_bound : float | None = None
295+ temperature_direction : bool | None = None
296+ dirty : bool = False
297+
298+
263299@dataclass
264300class SenseStatistics :
265301 """Sense statistics collection."""
266302
267303 temperature : float | None = None
268304 humidity : float | None = None
305+ temperature_hysteresis_state : bool | None = None
306+ humidity_hysteresis_state : bool | None = None
269307
270308
271309class PlugwiseNode (Protocol ):
0 commit comments