fix regulator state display
All checks were successful
Build .deb on release / Build-Deb (push) Successful in 1m51s

This commit is contained in:
Alex Janka 2024-02-13 09:53:19 +11:00
parent ccd46b657c
commit ef8d272eee
3 changed files with 4 additions and 3 deletions

2
Cargo.lock generated
View file

@ -2538,7 +2538,7 @@ dependencies = [
[[package]]
name = "tesla-charge-controller"
version = "1.2.0"
version = "1.2.1"
dependencies = [
"chrono",
"clap 4.4.11",

View file

@ -1,6 +1,6 @@
[package]
name = "tesla-charge-controller"
version = "1.2.0"
version = "1.2.1"
edition = "2021"
license = "MITNFA"
description = "Controls Tesla charge rate based on solar charge data"

View file

@ -323,7 +323,8 @@ function refresh_regulator_state() {
state_input.disabled = false;
fetch(api_url + "/regulator-state")
.then((response) => { response.json() })
.then((response) => response.json())
.catch(() => null)
.then((json) => update_regulator_state(json));
}