Skip to content

Commit

Permalink
Merge pull request #13 from deveth0/patch-3
Browse files Browse the repository at this point in the history
Fix  'dict_keys' object is not subscriptable for GPIOs
  • Loading branch information
tobias-richter authored Jan 12, 2021
2 parents 9ebd2b8 + fbebf88 commit af95371
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion action_plugins/tasmota.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def run(self, tmp=None, task_vars=None):
modules_ids = data.get(command).keys()
existing_value = next(iter(modules_ids))
elif (command.startswith('Gpio')):
existing_value = data.get(command.upper()).keys()[0]
gpios = data.get(command.upper()).keys()
existing_value = next(iter(gpios))
elif (command == 'Template'):
existing_value = data
elif (command == 'TimeStd' or command == 'TimeDst' ):
Expand Down

0 comments on commit af95371

Please sign in to comment.