From 28d266b2dac1c68ce1d492153c87374232603471 Mon Sep 17 00:00:00 2001 From: twendt Date: Mon, 17 Jul 2017 12:47:44 +0200 Subject: [PATCH] Support command for any rorg (#55) --- enocean/protocol/eep.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/enocean/protocol/eep.py b/enocean/protocol/eep.py index 673c748..1723413 100644 --- a/enocean/protocol/eep.py +++ b/enocean/protocol/eep.py @@ -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