Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support command for any rorg #55

Merged
merged 1 commit into from
Jul 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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