Skip to content

Commit 65a14b3

Browse files
authored
Merge pull request #39 from Garulf/fix-unsafe-key-on-input_select
Fix unsafe key on input select
2 parents f341775 + 2253921 commit 65a14b3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

plugin.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"Name": "HA-Commander",
55
"Description": "Search, and interact with Home Assistant using Wox or Flow Launcher.",
66
"Author": "Garulf",
7-
"Version": "5.0.0",
7+
"Version": "5.0.1",
88
"Language": "python",
99
"Website": "https://github.com/Garulf/HA-Commander",
1010
"IcoPath": "icons\\home-assistant.png",

plugin/homeassistant.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ class InputSelect(BaseEntity):
429429

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

0 commit comments

Comments
 (0)