Skip to content

Commit ff8f5e8

Browse files
authored
Update usage.md
Add doc for HomeStatus class
1 parent 63f4e96 commit ff8f5e8

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

usage.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,17 +422,57 @@ Methods :
422422
* **getLiveSnapshot** (camera=None, home=None, cid=None) : Get a jpeg of current live view of the camera
423423
* Input : camera name and optional home name or cameraID to lookup (str)
424424
* Output : jpeg binary content
425+
426+
427+
#### 4-6 HomeStatus class ####
428+
429+
430+
Constructor
431+
432+
```python
433+
homeStatus = lnetatmo.HomeStatus( authorization, home_id )
434+
```
435+
436+
Requires :
437+
- an authorization object (ClientAuth instance)
438+
- home_id which can be found in https://dev.netatmo.com/apidocumentation/control by using "GET homesdata"
439+
440+
Return : a homeStatus object. This object contains most administration properties of Home+ Control devices such as Smarther thermostat, Socket, Cable Output, Centralized fan, Micromodules, ...
441+
442+
Methods :
443+
444+
* **getRoomsId** : return all room ID
445+
* Output : list of IDs of every single room (only the one with Smarther thermostat)
446+
447+
* **getListRoomParam** : return every parameters of a room
448+
* Input : room ID
449+
* Output : list of parameters of a room
450+
451+
* **getRoomParam** : return a specific parameter for a specific room
452+
* Input : room ID and parameter
453+
* Output : value
454+
455+
* **getModulesId** : return all module IDs
456+
* Output : list of IDs of every single module (socket, cable outlet, ...)
457+
458+
* **getListModuleParam** : return every parameters of a module
459+
* Input : module ID
460+
* Output : list of parameters of a module
461+
462+
* **getModuleParam** : return a specific parameter for a specific module
463+
* Input : module ID and parameter
464+
* Output : value
425465

426466

427-
#### 4-5 Utilities functions ####
467+
#### 4-7 Utilities functions ####
428468

429469

430470
* **toTimeString** (timestamp) : Convert a Netatmo time stamp to a readable date/time format.
431471
* **toEpoch**( dateString) : Convert a date string (form YYYY-MM-DD_HH:MM:SS) to timestamp
432472
* **todayStamps**() : Return a couple of epoch time (start, end) for the current day
433473

434474

435-
#### 4-6 All-in-One function ####
475+
#### 4-8 All-in-One function ####
436476

437477

438478
If you just need the current temperature and humidity reported by a sensor with associated min and max values on the last 24 hours, you can get it all with only one call that handle all required steps including authentication :

0 commit comments

Comments
 (0)