-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNetatmo_Wind_Driver.groovy
54 lines (45 loc) · 1.55 KB
/
Netatmo_Wind_Driver.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
*
* Netatmo Wind Driver
*
* Based on Brian Steere's original Code
*
* Enhancements for Hubitat by CybrMage - March 3, 2020
*
*/
def version() { return "cybr-030420" }
metadata {
definition (name: "Netatmo Wind", namespace: "fuzzysb", author: "Stuart Buchanan") {
capability "Sensor"
capability "Battery"
capability "Refresh"
attribute "WindStrength", "number"
attribute "windSpeed", "number"
attribute "WindAngle", "number"
attribute "windDirection", "number"
attribute "GustStrength", "number"
attribute "GustAngle", "number"
attribute "max_wind_str", "number"
attribute "units", "string"
attribute "lastupdate", "string"
attribute "date_max_wind_str", "string"
attribute "Summary", "string"
command "poll"
}
preferences {
input title: "Settings", description: "To change units and time format, go to the Netatmo Connect App", displayDuringSetup: false, type: "paragraph", element: "paragraph"
input title: "Information", description: "Your Netatmo station updates the Netatmo servers approximately every 10 minutes. The Netatmo Connect app polls these servers every 5 minutes. If the time of last update is equal to or less than 10 minutes, pressing the refresh button will have no effect", displayDuringSetup: false, type: "paragraph", element: "paragraph"
}
}
// parse events into attributes
def parse(String description) {
log.debug "Parsing '${description}'"
}
def poll() {
log.debug "Polling"
parent.poll()
}
def refresh() {
log.debug "Refreshing"
parent.poll()
}