Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion custom_components/govee/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):

for component in PLATFORMS:
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(entry, component)
hass.config_entries.async_forward_entry_setups(entry, [component])
)

return True
Expand Down
14 changes: 6 additions & 8 deletions custom_components/govee/learning_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from dataclasses import asdict
import logging

import dacite
from govee_api_laggat import GoveeAbstractLearningStorage, GoveeLearnedInfo
import yaml

Expand All @@ -26,12 +25,12 @@ async def read(self):
learned_info = {}
try:
learned_dict = load_yaml(self._config_dir + LEARNING_STORAGE_YAML)
learned_info = {
device: dacite.from_dict(
data_class=GoveeLearnedInfo, data=learned_dict[device]
)
for device in learned_dict
}

for key, value in learned_dict.items():
learnedInfoItem = GoveeLearnedInfo()
learnedInfoItem.__dict__.update(**value)
learned_info[key] = learnedInfoItem
_LOGGER.info(
"Loaded learning information from %s.",
self._config_dir + LEARNING_STORAGE_YAML,
Expand All @@ -43,7 +42,6 @@ async def read(self):
self._config_dir + LEARNING_STORAGE_YAML,
)
except (
dacite.DaciteError,
TypeError,
UnicodeDecodeError,
yaml.YAMLError,
Expand Down
2 changes: 1 addition & 1 deletion custom_components/govee/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"homekit": {},
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/LaggAt/hacs-govee/issues",
"requirements": ["govee-api-laggat==0.2.2", "dacite==1.8.0"],
"requirements": ["govee-api-laggat==0.2.2"],
"ssdp": [],
"version": "2023.11.1",
"zeroconf": []
Expand Down