mirror of
https://codeberg.org/icewind/wifi-prometheus-exporter.git
synced 2026-06-03 16:44:11 +02:00
more device info
This commit is contained in:
parent
8222795e7c
commit
882602ba36
1 changed files with 16 additions and 2 deletions
18
src/main.rs
18
src/main.rs
|
|
@ -219,9 +219,23 @@ async fn send_update(
|
|||
QoS::AtLeastOnce,
|
||||
false,
|
||||
format!(
|
||||
r#"{{"state_topic": "wifi-exporter/{mac}/state", "name": "Wifi device {mac}", " payload_available": "connected", " payload_not_available": "disconnected", "unique_id": "wifi-{mac}"}}"#,
|
||||
r#"{{
|
||||
"state_topic": "wifi-exporter/{mac}/state",
|
||||
"device": {{
|
||||
"name": "Wifi device {mac}",
|
||||
"manufacturer": "Icewind",
|
||||
"model": "Wifi Tracker",
|
||||
"identifiers": "{mac}"
|
||||
}}
|
||||
"name": "Wifi device {mac}",
|
||||
"payload_home": "connected",
|
||||
"payload_not_home": "disconnected",
|
||||
"unique_id": "wifi-{mac}-connected",
|
||||
"icon": "mdi:wifi",
|
||||
"source_type": "router"
|
||||
}}"#,
|
||||
mac = mac
|
||||
)
|
||||
),
|
||||
)
|
||||
.await?;
|
||||
client
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue