diff --git a/pilot-v2/src/ha/mod.rs b/pilot-v2/src/ha/mod.rs index 90164d9..ba31abb 100644 --- a/pilot-v2/src/ha/mod.rs +++ b/pilot-v2/src/ha/mod.rs @@ -19,8 +19,6 @@ struct DeviceInfo { #[derive(Serialize)] struct EntityConfig<'a> { name: &'a str, - #[serde(rename = "type")] - entity_type: &'a str, unique_id: String, state_topic: String, availability_topic: String, @@ -69,7 +67,6 @@ pub async fn publish_all(client: &AsyncClient, cfg: &Config) -> Result<()> { let entity_name = format!("{}_{}", key, cfg.device.name); let entity = EntityConfig { name: &entity_name, - entity_type: "sensor", unique_id: format!("{}_{}", cfg.device.name, key), state_topic: format!("{}/{}", base, key), availability_topic: format!("{}/{}/available", base, key), @@ -98,7 +95,6 @@ pub async fn publish_all(client: &AsyncClient, cfg: &Config) -> Result<()> { let entity_name = format!("{}_{}", key, cfg.device.name); let entity = EntityConfig { name: &entity_name, - entity_type: "switch", unique_id: format!("{}_{}", cfg.device.name, key), state_topic: format!("{}/{}/state", base, key), availability_topic: format!("{}/{}/available", base, key),