Skip to content

Commit 30482f1

Browse files
authored
add readme
1 parent 9df06c5 commit 30482f1

File tree

1 file changed

+60
-0
lines changed
  • libraries/Zigbee/examples/Zigbee_Wind_Speed_Sensor

1 file changed

+60
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Zigbee Wind Speed Sensor Integration with HomeAssistant ZHA
2+
3+
This guide provides a workaround for integrating a Zigbee Wind Speed Sensor with HomeAssistant using the ZHA integration. Since the wind speed cluster is not natively supported, we will use the ZHA Toolkit from HACS to read the wind speed attribute and store it in a helper variable.
4+
## Alternative Option: Creating a Custom Quirk
5+
6+
For advanced users, a more robust solution is to create a custom quirk for your Zigbee Wind Speed Sensor. This approach involves writing a custom device handler that directly supports the wind speed cluster, providing a more seamless integration with HomeAssistant.
7+
8+
Creating a custom quirk can be complex and requires familiarity with Python and the Zigbee protocol. However, it offers greater flexibility and control over your device's behavior.
9+
10+
For more information and guidance on creating custom quirks, visit the [ZHA Device Handlers repository](https://github.com/zigpy/zha-device-handlers/).
11+
12+
## Prerequisites
13+
14+
- HomeAssistant installed and running
15+
- Zigbee Wind Speed Sensor paired with HomeAssistant ZHA
16+
- HACS (Home Assistant Community Store) installed. For more information, visit [HACS](https://hacs.xyz)
17+
18+
## Steps
19+
20+
### 1. Install ZHA Toolkit
21+
22+
1. Open HomeAssistant.
23+
2. Navigate to HACS > Integrations.
24+
3. Search for "ZHA Toolkit - Service for advanced Zigbee Usage" and install it. For more information, visit the [ZHA Toolkit repository](https://github.com/mdeweerd/zha-toolkit).
25+
4. Restart HomeAssistant to apply changes.
26+
27+
### 2. Create a Helper Variable
28+
29+
1. Go to Configuration -> Devices & Services -> Helpers.
30+
2. Click on "Add Helper" and select "Number".
31+
3. Name the helper (e.g., `wind_speed`), set the minimum and maximum values, and save it.
32+
33+
### 3. Create an Automation
34+
35+
1. Go to Configuration > Automations & Scenes.
36+
2. Click on "Add Automation" and choose "Start with an empty automation".
37+
3. Set a name for the automation (e.g., `Read Wind Speed`).
38+
4. Add a trigger:
39+
- Trigger Type: Time Pattern
40+
- Every: 30 seconds
41+
5. Add an action (Then do):
42+
- Action Type: ZHA Toolkit: Read Attribute
43+
- Setup the action:
44+
```yaml
45+
action: zha_toolkit.attr_read
46+
metadata: {}
47+
data:
48+
ieee: f0:f5:bd:ff:fe:0e:61:30 #set device IEEE address
49+
endpoint: 10 #set windspeed device endpoint
50+
cluster: 1035 #use this windspeed cluster
51+
attribute: 0 #read meaurement value
52+
state_id: input_number.wind_speed #save to created helper variable
53+
state_value_template: value/100 #use correct value format (convert u16 to float)
54+
```
55+
6. Save the automation.
56+
57+
## Conclusion
58+
59+
By following these steps, you can successfully integrate your Zigbee Wind Speed Sensor with HomeAssistant using the ZHA integration and ZHA Toolkit. The wind speed readings will be updated every 30 seconds and stored in the helper variable for use in your HomeAssistant setup.
60+
The helper variable `wind_speed` is now an entity in HomeAssistant. You can use this entity to display the wind speed on your dashboard or in other automations.

0 commit comments

Comments
 (0)