Skip to content

Commit

Permalink
added some commands on beagle
Browse files Browse the repository at this point in the history
  • Loading branch information
an0Nym0us63 committed Nov 10, 2020
1 parent 13c44ad commit fd93953
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions resources/blead/devices/beagle.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,39 @@ def parse(self,data,mac,name,manuf):
if cf == '00' and mac.upper() in globals.KNOWN_DEVICES:
action['present'] = 1
action['firmware'] = manuf[24:30]
if manuf[22:24] == '02':
if manuf[22:24] == '00':
action['value'] = '0'
action['label'] = 'Off'
elif manuf[22:24] == '01':
action['value'] = '1'
action['label'] = 'On'
elif manuf[22:24] == '02':
action['value'] = '2'
action['label'] = 'Toggle'
elif manuf[22:24] == '03':
action['value'] = '3'
action['label'] = 'Dim Up'
elif manuf[22:24] == '04':
action['value'] = '4'
action['label'] = 'Dim Down'
elif manuf[22:24] == '05':
action['value'] = '2'
action['value'] = '5'
action['label'] = 'Haut'
elif self.manuf[22:24] == '06':
action['value'] = '3'
elif manuf[22:24] == '06':
action['value'] = '6'
action['label'] = 'Bas'
elif manuf[22:24] == '07':
action['value'] = '7'
action['label'] = 'Stop'
elif manuf[22:24] == '08':
action['value'] = '8'
action['label'] = 'Scene User'
elif manuf[22:24] == '09':
action['value'] = '9'
action['label'] = 'Scene In'
elif manuf[22:24] == '0a':
action['value'] = '10'
action['label'] = 'Scene Out'
elif cf == '01' and mac.upper() not in globals.KNOWN_DEVICES:
action['present'] = 1
else:
Expand Down

0 comments on commit fd93953

Please sign in to comment.