use async_trait::async_trait;
use tokio::sync::broadcast;
use super::intent::Intent;
#[derive(Debug, Clone)]
pub struct StateUpdate {
pub service_type: String,
pub target: String,
pub property: String,
pub output_id: Option<String>,
pub value: serde_json::Value,
}
#[async_trait]
pub trait ServiceAdapter: Send + Sync {
fn service_type(&self) -> &'static str;
async fn send_intent(&self, target: &str, intent: &Intent) -> anyhow::Result<()>;
fn subscribe_state(&self) -> broadcast::Receiver<StateUpdate>;
}