Remote Access: user agent and status display fixes (#31667)

This commit is contained in:
Michael Geers 2026-07-10 18:40:21 +02:00 • committed by GitHub
parent f7a882fcb9
commit ac08a53e0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 11 additions and 4 deletions

View file

@ -243,6 +243,7 @@ export default {
case "dimmed":
case "curtailed":
case "loginBlocked":
case "remoteEnabled":
return value
? this.$t("config.deviceValue.yes")
: this.$t("config.deviceValue.no");

View file

@ -31,7 +31,7 @@
<span v-if="status.connected" class="text-primary">
{{ $t("config.remote.connected") }}
</span>
<span v-else class="text-muted small">
<span v-else :class="config.enabled ? 'text-danger' : 'small'">
{{ $t("config.remote.disconnected") }}
</span>
</div>

View file

@ -868,13 +868,16 @@ export default defineComponent({
return { configured: { value: false } };
}
const tags: DeviceTags = {
enabled: { value: remote.config?.enabled },
connected: { value: remote.status?.connected },
remoteEnabled: { value: remote.config?.enabled },
connected: {
value: remote.status?.connected,
error: remote.config?.enabled && !remote.status?.connected,
},
};
if (remote.status?.loginBlocked) {
tags["loginBlocked"] = { value: true, error: true };
}
if (remote.status?.connected) {
if (remote.config?.enabled) {
const lastSeen = remote.status?.lastSeen;
const count = lastSeen
? Object.keys(lastSeen).filter((u) => isRemoteClientActive(lastSeen, u)).length

View file

@ -235,6 +235,7 @@
"price": "Preis",
"productionLimited": "Erzeugung begrenzt",
"range": "Reichweite",
"remoteEnabled": "Aktiviert",
"returnEnergy": "Energie (rückwärts)",
"singlePhase": "Einphasig",
"soc": "Ladestand",

View file

@ -235,6 +235,7 @@
"price": "Price",
"productionLimited": "Production limited",
"range": "Range",
"remoteEnabled": "Enabled",
"returnEnergy": "Energy (reverse)",
"singlePhase": "Single phase",
"soc": "Charge",

View file

@ -91,6 +91,7 @@ func (t *Tunnel) connect(ctx context.Context) (bool, error) {
HTTPHeader: http.Header{
"Authorization": []string{"Bearer " + t.token},
"X-Sponsor-Token": []string{sponsor.Token},
"User-Agent": []string{"evcc/" + util.FormattedVersion()},
},
})
if err != nil {