Skip to content

Commit

Permalink
Merge pull request #39 from Garulf/fix-unsafe-key-on-input_select
Browse files Browse the repository at this point in the history
Fix unsafe key on input select
  • Loading branch information
Garulf authored Dec 3, 2022
2 parents f341775 + 2253921 commit 65a14b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Name": "HA-Commander",
"Description": "Search, and interact with Home Assistant using Wox or Flow Launcher.",
"Author": "Garulf",
"Version": "5.0.0",
"Version": "5.0.1",
"Language": "python",
"Website": "https://github.com/Garulf/HA-Commander",
"IcoPath": "icons\\home-assistant.png",
Expand Down
2 changes: 1 addition & 1 deletion plugin/homeassistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ class InputSelect(BaseEntity):

def __init__(self, client: Client, entity: dict) -> None:
super().__init__(client, entity)
for option in self.attributes["options"]:
for option in self.attributes.get("options", []):
setattr(self, option, partial(self._select, option))
getattr(self, option).name = option
getattr(self, option).__doc__ = 'Set option to "{}"'.format(option)
Expand Down

0 comments on commit 65a14b3

Please sign in to comment.