|
|
@@ -25,13 +25,13 @@ pub async fn connect_to_ha(ip: String, token: String) -> Result<(), Box<dyn std:
|
|
|
}
|
|
|
|
|
|
if parsed["type"] == "auth_ok" {
|
|
|
- let areas_msg = json!({"type": "config/area_registry/list", "id": message_id});
|
|
|
+ /*let areas_msg = json!({"type": "config/area_registry/list", "id": message_id});
|
|
|
connection.send(Message::Text(areas_msg.to_string().into())).await?;
|
|
|
- message_id += 1;
|
|
|
+ message_id += 1;*/
|
|
|
|
|
|
- let devices_msg = json!({"type": "config/device_registry/list", "id": message_id});
|
|
|
+ /*let devices_msg = json!({"type": "config/device_registry/list", "id": message_id});
|
|
|
connection.send(Message::Text(devices_msg.to_string().into())).await?;
|
|
|
- message_id += 1;
|
|
|
+ message_id += 1;*/
|
|
|
|
|
|
let entities_msg = json!({"type": "config/entity_registry/list", "id": message_id});
|
|
|
connection.send(Message::Text(entities_msg.to_string().into())).await?;
|
|
|
@@ -40,6 +40,7 @@ pub async fn connect_to_ha(ip: String, token: String) -> Result<(), Box<dyn std:
|
|
|
|
|
|
if parsed["type"] == "result" {
|
|
|
println!("result");
|
|
|
+ println!("{:#?}", parsed);
|
|
|
}
|
|
|
}
|
|
|
}
|