@@ -32,7 +32,6 @@ class PlugwiseNumberEntityDescription(
3232):
3333 """Describes Plugwise Number entity."""
3434
35- api_attribute : str = ""
3635 async_number_fn : str = ""
3736
3837
@@ -47,7 +46,6 @@ class PlugwiseNumberEntityDescription(
4746 native_unit_of_measurement = UnitOfTime .MINUTES ,
4847 native_max_value = 255 ,
4948 native_min_value = 1 ,
50- api_attribute = "reset_timer" ,
5149 ),
5250 PlugwiseNumberEntityDescription (
5351 key = "maintenance_interval" ,
@@ -59,7 +57,6 @@ class PlugwiseNumberEntityDescription(
5957 native_unit_of_measurement = UnitOfTime .MINUTES ,
6058 native_max_value = 1440 ,
6159 native_min_value = 5 ,
62- api_attribute = "maintenance_interval" ,
6360 ),
6461 PlugwiseNumberEntityDescription (
6562 key = "sleep_duration" ,
@@ -71,7 +68,6 @@ class PlugwiseNumberEntityDescription(
7168 entity_category = EntityCategory .CONFIG ,
7269 native_max_value = 1440 ,
7370 native_min_value = 60 ,
74- api_attribute = "sleep_duration" ,
7571 ),
7672 PlugwiseNumberEntityDescription (
7773 key = "awake_duration" ,
@@ -83,7 +79,6 @@ class PlugwiseNumberEntityDescription(
8379 entity_category = EntityCategory .CONFIG ,
8480 native_max_value = 60 ,
8581 native_min_value = 1 ,
86- api_attribute = "awake_duration" ,
8782 ),
8883 PlugwiseNumberEntityDescription (
8984 key = "clock_interval" ,
@@ -95,7 +90,46 @@ class PlugwiseNumberEntityDescription(
9590 native_unit_of_measurement = UnitOfTime .MINUTES ,
9691 native_max_value = 65535 ,
9792 native_min_value = 1 ,
98- api_attribute = "clock_interval" ,
93+ ),
94+ PlugwiseNumberEntityDescription (
95+ key = "humidity_upper_bound" ,
96+ translation_key = "sense_humidity_upper_bound" ,
97+ async_number_fn = "set_hysteresis_humidity_upper_bound" ,
98+ node_feature = NodeFeature .SENSE_HYSTERESIS ,
99+ entity_category = EntityCategory .CONFIG ,
100+ device_class = NumberDeviceClass .HUMIDITY ,
101+ native_max_value = 99 ,
102+ native_min_value = 1 ,
103+ ),
104+ PlugwiseNumberEntityDescription (
105+ key = "humidity_lower_bound" ,
106+ translation_key = "sense_humidity_lower_bound" ,
107+ async_number_fn = "set_hysteresis_humidity_lower_bound" ,
108+ node_feature = NodeFeature .SENSE_HYSTERESIS ,
109+ entity_category = EntityCategory .CONFIG ,
110+ device_class = NumberDeviceClass .HUMIDITY ,
111+ native_max_value = 99 ,
112+ native_min_value = 1 ,
113+ ),
114+ PlugwiseNumberEntityDescription (
115+ key = "temperature_upper_bound" ,
116+ translation_key = "sense_temperature_upper_bound" ,
117+ async_number_fn = "set_hysteresis_temperature_upper_bound" ,
118+ node_feature = NodeFeature .SENSE_HYSTERESIS ,
119+ entity_category = EntityCategory .CONFIG ,
120+ device_class = NumberDeviceClass .TEMPERATURE ,
121+ native_max_value = 60 ,
122+ native_min_value = 1 ,
123+ ),
124+ PlugwiseNumberEntityDescription (
125+ key = "temperature_lower_bound" ,
126+ translation_key = "sense_temperature_lower_bound" ,
127+ async_number_fn = "set_hysteresis_temperature_lower_bound" ,
128+ node_feature = NodeFeature .SENSE_HYSTERESIS ,
129+ entity_category = EntityCategory .CONFIG ,
130+ device_class = NumberDeviceClass .TEMPERATURE ,
131+ native_max_value = 60 ,
132+ native_min_value = 1 ,
99133 ),
100134)
101135
@@ -178,7 +212,7 @@ def _handle_coordinator_update(self) -> None:
178212 return
179213 self ._attr_native_value = getattr (
180214 self .coordinator .data [self .entity_description .node_feature ],
181- self .entity_description .api_attribute ,
215+ self .entity_description .key ,
182216 )
183217 self .async_write_ha_state ()
184218
0 commit comments