plugwise 1.5.1__py3-none-any.whl → 1.5.1a3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
plugwise/constants.py CHANGED
@@ -123,7 +123,7 @@ P1_LEGACY_MEASUREMENTS: Final[dict[str, UOM]] = {
123
123
  # radiator_valve: 'uncorrected_temperature', 'temperature_offset'
124
124
 
125
125
  DEVICE_MEASUREMENTS: Final[dict[str, DATA | UOM]] = {
126
- "humidity": UOM(NONE), # Specific for a Jip
126
+ "humidity": UOM(PERCENTAGE), # Specific for a Jip
127
127
  "illuminance": UOM(UNIT_LUMEN), # Specific for an Anna
128
128
  "temperature": UOM(TEMP_CELSIUS), # HA Core thermostat current_temperature
129
129
  "thermostat": DATA("setpoint", TEMP_CELSIUS), # HA Core thermostat setpoint
@@ -425,44 +425,44 @@ class SmileBinarySensors(TypedDict, total=False):
425
425
  class SmileSensors(TypedDict, total=False):
426
426
  """Smile Sensors class."""
427
427
 
428
- battery: int
428
+ battery: float
429
429
  cooling_activation_outdoor_temperature: float
430
430
  cooling_deactivation_threshold: float
431
431
  dhw_temperature: float
432
432
  domestic_hot_water_setpoint: float
433
433
  temperature: float
434
- electricity_consumed: float
435
- electricity_consumed_interval: float
434
+ electricity_consumed: int
435
+ electricity_consumed_interval:int
436
436
  electricity_consumed_off_peak_cumulative: float
437
- electricity_consumed_off_peak_interval: float
438
- electricity_consumed_off_peak_point: float
437
+ electricity_consumed_off_peak_interval: int
438
+ electricity_consumed_off_peak_point: int
439
439
  electricity_consumed_peak_cumulative: float
440
- electricity_consumed_peak_interval: float
441
- electricity_consumed_peak_point: float
442
- electricity_consumed_point: float
443
- electricity_phase_one_consumed: float
444
- electricity_phase_two_consumed: float
445
- electricity_phase_three_consumed: float
446
- electricity_phase_one_produced: float
447
- electricity_phase_two_produced: float
448
- electricity_phase_three_produced: float
449
- electricity_produced: float
450
- electricity_produced_interval: float
440
+ electricity_consumed_peak_interval: int
441
+ electricity_consumed_peak_point: int
442
+ electricity_consumed_point: int
443
+ electricity_phase_one_consumed: int
444
+ electricity_phase_two_consumed: int
445
+ electricity_phase_three_consumed: int
446
+ electricity_phase_one_produced: int
447
+ electricity_phase_two_produced: int
448
+ electricity_phase_three_produced: int
449
+ electricity_produced: int
450
+ electricity_produced_interval: int
451
451
  electricity_produced_off_peak_cumulative: float
452
- electricity_produced_off_peak_interval: float
453
- electricity_produced_off_peak_point: float
452
+ electricity_produced_off_peak_interval: int
453
+ electricity_produced_off_peak_point: int
454
454
  electricity_produced_peak_cumulative: float
455
- electricity_produced_peak_interval: float
456
- electricity_produced_peak_point: float
457
- electricity_produced_point: float
455
+ electricity_produced_peak_interval: int
456
+ electricity_produced_peak_point: int
457
+ electricity_produced_point: int
458
458
  gas_consumed_cumulative: float
459
459
  gas_consumed_interval: float
460
460
  humidity: float
461
461
  illuminance: float
462
462
  intended_boiler_temperature: float
463
- modulation_level: int
463
+ modulation_level: float
464
464
  net_electricity_cumulative: float
465
- net_electricity_point: float
465
+ net_electricity_point: int
466
466
  outdoor_air_temperature: float
467
467
  outdoor_temperature: float
468
468
  return_temperature: float
@@ -470,7 +470,7 @@ class SmileSensors(TypedDict, total=False):
470
470
  setpoint_high: float
471
471
  setpoint_low: float
472
472
  temperature_difference: float
473
- valve_position: int
473
+ valve_position: float
474
474
  voltage_phase_one: float
475
475
  voltage_phase_two: float
476
476
  voltage_phase_three: float
plugwise/util.py CHANGED
@@ -173,8 +173,10 @@ def format_measure(measure: str, unit: str) -> float | int:
173
173
  result = float(f"{round(float_measure, 1):.1f}")
174
174
  elif abs(float_measure) < 10:
175
175
  result = float(f"{round(float_measure, 2):.2f}")
176
- elif abs(float_measure) >= 10:
176
+ elif abs(float_measure) >= 10 and abs(float_measure) < 100:
177
177
  result = float(f"{round(float_measure, 1):.1f}")
178
+ elif abs(float_measure) >= 100:
179
+ result = int(round(float_measure))
178
180
 
179
181
  return result
180
182
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: plugwise
3
- Version: 1.5.1
3
+ Version: 1.5.1a3
4
4
  Summary: Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3.
5
5
  Home-page: https://github.com/plugwise/python-plugwise
6
6
  Author: Plugwise device owners
@@ -1,17 +1,17 @@
1
1
  plugwise/__init__.py,sha256=_AYvIt5rOBksqxp5Lrr7iv11i3mXXJpEQ6Q40pqtOPk,17147
2
2
  plugwise/common.py,sha256=WltDqYlW5D3KqIcm5U_gVY4izLZSk_Uk-MEJl6RDNbs,12592
3
- plugwise/constants.py,sha256=al6wKFQbcHftkwb4pGLOxfNcV7m1C9HnQZLaKvjSJPs,16756
3
+ plugwise/constants.py,sha256=iGOBzNok11T5dk-AFVARwNR6qmfLQoOm2YWs5IG2u2o,16725
4
4
  plugwise/data.py,sha256=SgfwTGKwtZnXI8KGePTCoMODn8GQLq4YkKwf697--ds,10782
5
5
  plugwise/exceptions.py,sha256=Ce-tO9uNsMB-8FP6VAxBvsHNJ-NIM9F0onUZOdZI4Ys,1110
6
6
  plugwise/helper.py,sha256=nJ3wUZuQqJRhjjxk5dm5dGyQv1BK8KKvs5s7LQPtAEg,44386
7
7
  plugwise/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  plugwise/smile.py,sha256=BALKDMY730C-vHCnOadnaM9ezv0iIEnu-V-BsHJRewY,18729
9
- plugwise/util.py,sha256=WAhcQEvLw7ku-3VhKWdJR5lnO7Zodj5-0cG-dmDflnk,8065
9
+ plugwise/util.py,sha256=Ls9ULWVH6vTv65ixkoWzGRmRCZ5AJ36gUWxzAiUJ-Rw,8181
10
10
  plugwise/legacy/data.py,sha256=8QRzW7TlOGTs1UdMRPMm2PZTJxYnmF3ARnW8_STV65A,3072
11
11
  plugwise/legacy/helper.py,sha256=HI9EvtTWfzKH5nX4G-YtLpn9Qvi50OLMRRIaN5v7rqU,18358
12
12
  plugwise/legacy/smile.py,sha256=E_Zc1muzylyRMeYYbP4QhGBUQf_KaUUnbPAuIhH8WxY,11208
13
- plugwise-1.5.1.dist-info/LICENSE,sha256=mL22BjmXtg_wnoDnnaqps5_Bg_VGj_yHueX5lsKwbCc,1144
14
- plugwise-1.5.1.dist-info/METADATA,sha256=EwcDfmPd80lqQzKJ6Zj6zZrUwWh5WXBKNZN87Fup_z8,9097
15
- plugwise-1.5.1.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
16
- plugwise-1.5.1.dist-info/top_level.txt,sha256=MYOmktMFf8ZmX6_OE1y9MoCZFfY-L8DA0F2tA2IvE4s,9
17
- plugwise-1.5.1.dist-info/RECORD,,
13
+ plugwise-1.5.1a3.dist-info/LICENSE,sha256=mL22BjmXtg_wnoDnnaqps5_Bg_VGj_yHueX5lsKwbCc,1144
14
+ plugwise-1.5.1a3.dist-info/METADATA,sha256=NseSe1bvvUEFR1qE9R-RbtKOcX3a_V0o_GCyBQzbEdw,9099
15
+ plugwise-1.5.1a3.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
16
+ plugwise-1.5.1a3.dist-info/top_level.txt,sha256=MYOmktMFf8ZmX6_OE1y9MoCZFfY-L8DA0F2tA2IvE4s,9
17
+ plugwise-1.5.1a3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.5.0)
2
+ Generator: setuptools (75.3.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5