diff --git a/config_example.yaml b/config_example.yaml index f7bb3f1..84ffc26 100644 --- a/config_example.yaml +++ b/config_example.yaml @@ -1,23 +1,44 @@ # running Router.dump() on initial run will fill this all out -api_key: +!YAMLConfig +api_key: TzPrxDf9hyWZoR5jvUaGDZn4Hlxp2XF67ue4ynSI bridge_ip: 192.168.1.1 aliases: + behavior_instances: {} + behavior_scripts: {} + bridge_homes: {} + bridges: {} + buttons: + 071ce3e6-5206-4814-b4fc-ed8b347ddd16: r_button + 4428755c-70a3-4aa0-b219-665cbe56d918: ktch_button + 5f63abf7-23b3-4294-bece-29a75602fbfe: k_button + device_powers: {} + entertainment_configurations: {} + entertainments: {} + geofence_clients: {} + geolocations: {} light_levels: 38b5b9f0-f754-4e70-8609-d40e52ef8f12: yd_parking_lumens 9ea4f33d-0da1-4bc5-9b01-98396a3b7677: ktch_lumens ef343aaf-0e77-4563-b8ec-bd0662990ceb: yd_fenced_lumens lights: + 1795db24-4b81-4763-a6db-1d0d44373599: r_lamp + 1f1273b3-c06f-4231-a85b-f6263331f5d9: ktch_lamp + 26ec5794-efda-4dcb-aacb-4a2cf746b6b7: hall 3c9d5ba7-ea43-45f8-a823-f3b32168776d: r_desk - 46588240-8205-4615-a2b5-27a8ecf9715f: p_strip - 930437b3-a0ef-4ade-be50-7cce032b9d0b: g_doors - 93a1533e-bfeb-4103-a150-180943a3ff3b: r_curtain motions: 3cf4bc43-3c73-43c9-ba03-d9b6af84785b: yd_fenced_motion - 59e03887-fd24-42eb-b7f0-f5b88eb20291: ktch_motion - rooms: - 3cecbcff-a654-48c4-a699-84882b087c17: porch - 448afef5-cccb-49d3-ab27-aa8e4c6e7dd4: toilet + 96c32f15-df35-4359-83b8-f61859260fe9: yd_parking_motion + relative_rotaries: {} + rooms: {} + scenes: {} temperatures: 357431ce-7470-4722-8f48-4c45546dd53b: yd_parking_temp 62762858-1c26-436e-a4fd-1f97382dc0a7: ktch_temp 96d545e0-bf61-4d4d-9ada-f5e8fb7d75e5: yd_fenced_temp + zgb_connectivities: {} + zigbee_connectivities: + 0042b79e-edba-4563-a3a6-070def437702: zig_p_strip + 16571b0b-31f1-4db3-a553-57c79487c028: zig_ktch_lamp + 19d2f29b-1b14-4df2-afe8-337f11db8813: zig_kl + zigbee_device_discoveries: {} + zones: {} diff --git a/phlyght.log b/phlyght.log new file mode 100644 index 0000000..e69de29 diff --git a/phlyght/http.py b/phlyght/http.py index 6ae4c9d..3343edc 100644 --- a/phlyght/http.py +++ b/phlyght/http.py @@ -886,13 +886,35 @@ class Router(HueAPIv2, HueEDK): def __init__(self, max_cache_size=10, **kwargs): from .abc import YAMLConfig - _config = Path("config_test.yaml") + _config = Path("config.yaml") if not _config.exists(): _config.touch() self.config = YAMLConfig( api_key=kwargs.get("api_key", None), bridge_host=kwargs.get("bridge_host", None), - aliases={}, + aliases={ + "behavior_instances": {}, + "behavior_scripts": {}, + "bridge_homes": {}, + "bridges": {}, + "buttons": {}, + "device_powers": {}, + "entertainment_configurations": {}, + "entertainments": {}, + "geofence_clients": {}, + "geolocations": {}, + "light_levels": {}, + "lights": {}, + "motions": {}, + "relative_rotaries": {}, + "rooms": {}, + "scenes": {}, + "temperatures": {}, + "zgb_connectivities": {}, + "zigbee_connectivities": {}, + "zigbee_device_discoveries": {}, + "zones": {}, + }, ) with _config.open("w+") as f: yaml_dump(self.config, f, default_flow_style=False)