Skip to content

Commit

Permalink
0.41.0 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
Adminiuga committed Nov 7, 2021
2 parents 32641b8 + b6af780 commit 8219980
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 6 deletions.
2 changes: 1 addition & 1 deletion zigpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding: utf-8
MAJOR_VERSION = 0
MINOR_VERSION = 40
MINOR_VERSION = 41
PATCH_VERSION = "0"
__short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}"
__version__ = f"{__short_version__}.{PATCH_VERSION}"
78 changes: 73 additions & 5 deletions zigpy/zcl/clusters/measurement.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,79 @@ class OccupancySensing(Cluster):
client_commands = {}


# TODO: 0x0407: Leaf Wetness
# TODO: 0x0408: Soil Moisture
# TODO: 0x0409: pH Measurement
# TODO: 0x040A: Electrical Conductivity
# TODO: 0x040B: Wind Speed Measurement
class LeafWetness(Cluster):
cluster_id = 0x0407
name = "Leaf Wetness Measurement"
ep_attribute = "leaf_wetness"
attributes = {
# Leaf Wetness Measurement Information
0x0000: ("measured_value", t.uint16_t),
0x0001: ("min_measured_value", t.uint16_t),
0x0002: ("max_measured_value", t.uint16_t),
0x0003: ("tolerance", t.uint16_t),
}
server_commands = {}
client_commands = {}


class SoilMoisture(Cluster):
cluster_id = 0x0408
name = "Soil Moisture Measurement"
ep_attribute = "soil_moisture"
attributes = {
# Soil Moisture Measurement Information
0x0000: ("measured_value", t.uint16_t),
0x0001: ("min_measured_value", t.uint16_t),
0x0002: ("max_measured_value", t.uint16_t),
0x0003: ("tolerance", t.uint16_t),
}
server_commands = {}
client_commands = {}


class PH(Cluster):
cluster_id = 0x0409
name = "pH Measurement"
ep_attribute = "ph"
attributes = {
# pH Measurement Information
0x0000: ("measured_value", t.uint16_t),
0x0001: ("min_measured_value", t.uint16_t),
0x0002: ("max_measured_value", t.uint16_t),
0x0003: ("tolerance", t.uint16_t),
}
server_commands = {}
client_commands = {}


class ElectricalConductivity(Cluster):
cluster_id = 0x040A
name = "Electrical Conductivity"
ep_attribute = "electrical_conductivity"
attributes = {
# Electrical Conductivity Information
0x0000: ("measured_value", t.uint16_t),
0x0001: ("min_measured_value", t.uint16_t),
0x0002: ("max_measured_value", t.uint16_t),
0x0003: ("tolerance", t.uint16_t),
}
server_commands = {}
client_commands = {}


class WindSpeed(Cluster):
cluster_id = 0x040B
name = "Wind Speed Measurement"
ep_attribute = "wind_speed"
attributes = {
# Wind Speed Measurement Information
0x0000: ("measured_value", t.uint16_t),
0x0001: ("min_measured_value", t.uint16_t),
0x0002: ("max_measured_value", t.uint16_t),
0x0003: ("tolerance", t.uint16_t),
}
server_commands = {}
client_commands = {}


class _ConcentrationMixin:
Expand Down

0 comments on commit 8219980

Please sign in to comment.