Skip to content

Commit d9178b6

Browse files
authored
Deprecate classes and add example functions
Mark several classes and their constructors as deprecated. Add example functions for HomeStatus, ThermostatData, HomesData, and HomeCoach with exception handling.
1 parent 9b03bfb commit d9178b6

1 file changed

Lines changed: 22 additions & 3 deletions

File tree

usage.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ Properties, all properties are read-only unless specified :
207207

208208
#### 4-3 User class ####
209209

210-
210+
_!!Deprecated_
211211

212212
Constructor
213213

@@ -355,7 +355,7 @@ at all if you slip over two days as required in a shifting 24 hours window.
355355

356356
#### 4-5 HomeData class ####
357357

358-
358+
_!!Deprecated_
359359

360360
Constructor
361361

@@ -512,6 +512,7 @@ Methods :
512512
* Output : value
513513

514514
```
515+
def HOMESTATUS():
515516
homestatus = lnetatmo.HomeStatus(authorization, homeid)
516517
print ('Rooms in Homestatus')
517518
for r in homestatus.rooms:
@@ -529,7 +530,10 @@ Methods :
529530
print (lnetatmo.TYPES[vt])
530531
print (m.keys())
531532
532-
533+
try:
534+
HOMESTATUS()
535+
except Exception as e:
536+
print (e)
533537
```
534538

535539

@@ -563,6 +567,7 @@ Methods :
563567
Example :
564568

565569
```
570+
def THERMOSTAT():
566571
device = lnetatmo.ThermostatData(authorization, homeid)
567572
for i in device.rawData:
568573
print ('rawData')
@@ -580,6 +585,10 @@ Example :
580585
TH = device.Thermostat_Data()
581586
print (TH.keys())
582587
588+
try:
589+
THERMOSTAT()
590+
except Exception as e:
591+
print (e)
583592
```
584593

585594
#### 4-8 HomesData class ####
@@ -606,6 +615,7 @@ Methods :
606615
Example :
607616

608617
```
618+
def HOMESDATA():
609619
homesData = lnetatmo.HomesData ( authorization, home_id )
610620
print (homesdata.Homes_Data['name'])
611621
print (homesdata.Homes_Data['altitude'])
@@ -625,6 +635,10 @@ Example :
625635
print ('Schedules in HomesData')
626636
print (homesdata.Homes_Data['schedules'][0].keys())
627637
638+
try:
639+
HOMESDATA()
640+
except Exception as e:
641+
print (e)
628642
```
629643

630644
#### 4-9 Homecoach class ####
@@ -658,6 +672,7 @@ Example :
658672

659673

660674
```
675+
def HOMECOACH():
661676
homecoach = lnetatmo.HomeCoach(authorization, homeid)
662677
#
663678
Not_updated = []
@@ -689,6 +704,10 @@ Example :
689704
print (Not_updated)
690705
print (updated)
691706
707+
try:
708+
HOMECOACH()
709+
except Exception as e:
710+
print (e)
692711
```
693712

694713

0 commit comments

Comments
 (0)