|
|
|
@ -57,7 +57,10 @@ If($null -ne $SetStatus){
|
|
|
|
|
"icon"="mdi:microsoft-teams";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Invoke-RestMethod -Uri "$HAUrl/api/states/sensor.teams_status" -Method POST -Headers $headers -Body ($params|ConvertTo-Json) -ContentType "application/json"
|
|
|
|
|
|
|
|
|
|
$params = $params | ConvertTo-Json
|
|
|
|
|
Invoke-RestMethod -Uri "$HAUrl/api/states/sensor.teams_status" -Method POST -Headers $headers -Body ([System.Text.Encoding]::UTF8.GetBytes($params)) -ContentType "application/json"
|
|
|
|
|
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -146,7 +149,9 @@ If ($CurrentStatus -ne $Status) {
|
|
|
|
|
"icon"="mdi:microsoft-teams";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Invoke-RestMethod -Uri "$HAUrl/api/states/sensor.teams_status" -Method POST -Headers $headers -Body ($params|ConvertTo-Json) -ContentType "application/json"
|
|
|
|
|
|
|
|
|
|
$params = $params | ConvertTo-Json
|
|
|
|
|
Invoke-RestMethod -Uri "$HAUrl/api/states/sensor.teams_status" -Method POST -Headers $headers -Body ([System.Text.Encoding]::UTF8.GetBytes($params)) -ContentType "application/json"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
If ($CurrentActivity -ne $Activity) {
|
|
|
|
@ -159,7 +164,8 @@ If ($CurrentActivity -ne $Activity) {
|
|
|
|
|
"icon"="$ActivityIcon";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Invoke-RestMethod -Uri "$HAUrl/api/states/sensor.teams_activity" -Method POST -Headers $headers -Body ($params|ConvertTo-Json) -ContentType "application/json"
|
|
|
|
|
$params = $params | ConvertTo-Json
|
|
|
|
|
Invoke-RestMethod -Uri "$HAUrl/api/states/sensor.teams_activity" -Method POST -Headers $headers -Body ([System.Text.Encoding]::UTF8.GetBytes($params)) -ContentType "application/json"
|
|
|
|
|
}
|
|
|
|
|
Start-Sleep 1
|
|
|
|
|
} Until ($Enable -eq 0)
|
|
|
|
|