Skip to content

Commit

Permalink
Support command for any rorg (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
twendt authored and kipe committed Jul 17, 2017
1 parent 7a0b619 commit 28d266b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions enocean/protocol/eep.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ def find_profile(self, bitarray, eep_rorg, rorg_func, rorg_type, direction=None,

profile = self.telegrams[eep_rorg][rorg_func][rorg_type]

if eep_rorg == RORG.VLD:
# For VLD; multiple commands can be defined, with the command id always in same location (per RORG-FUNC-TYPE).
if command:
# multiple commands can be defined, with the command id always in same location (per RORG-FUNC-TYPE).
eep_command = profile.find('command', recursive=False)
# If commands are not set in EEP, or command is None,
# get the first data as a "best guess".
if not eep_command or command is None:
if not eep_command:
return profile.find('data', recursive=False)

# If eep_command is defined, so should be data.command
Expand Down

0 comments on commit 28d266b

Please sign in to comment.