Skip to content

Commit

Permalink
Alpha 03 (#79)
Browse files Browse the repository at this point in the history
* Update the changelog.

* Fix device import issue.

* Fix device import issue.
  • Loading branch information
twrecked authored Nov 24, 2023
1 parent 51ffb15 commit 627a541
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
0.9.0a3:
fix device tracker import issue
Slovakian translations, thanks @misa1515
0.9.0a2:
add extra import debug
0.9.0a1:
Expand Down
6 changes: 4 additions & 2 deletions custom_components/virtual/cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,12 @@ def import_yaml(config):
for device_trackers in all_device_trackers:
if device_trackers[CONF_PLATFORM] != COMPONENT_DOMAIN:
continue
for device_tracker in device_trackers.get("devices", []):
for device_tracker_name in device_trackers.get("devices", []):
if isinstance(device_tracker_name, dict):
device_tracker_name = device_tracker_name[CONF_NAME]
devices = _parse_old_config(devices, [{
CONF_PLATFORM: COMPONENT_DOMAIN,
CONF_NAME: device_tracker[CONF_NAME]
CONF_NAME: device_tracker_name
}], str(Platform.DEVICE_TRACKER))

_LOGGER.info(f"devices={devices}")
Expand Down

0 comments on commit 627a541

Please sign in to comment.