Fix UTF8 Chars

pull/8/head
Linus Dietz 4 years ago
parent f857f12ab8
commit d57206ee82

@ -57,7 +57,10 @@ If($null -ne $SetStatus){
"icon"="mdi:microsoft-teams"; "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 break
} }
@ -146,7 +149,9 @@ If ($CurrentStatus -ne $Status) {
"icon"="mdi:microsoft-teams"; "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) { If ($CurrentActivity -ne $Activity) {
@ -159,7 +164,8 @@ If ($CurrentActivity -ne $Activity) {
"icon"="$ActivityIcon"; "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 Start-Sleep 1
} Until ($Enable -eq 0) } Until ($Enable -eq 0)

Loading…
Cancel
Save