v0.12.0
This commit is contained in:
@@ -5,7 +5,7 @@ ebe64386eb553c298994df40f73a56b4980eedcd88a84cb310134070c1753eb3 ./Cargo.toml
|
||||
19b2943504acb8f8de280f873a8dbec4bb6ebbe3870b158f5655d4fb8c298f5f ./LICENSE
|
||||
92633f07b839dcdeafa96cb3ffdaaa600f65387a9113ed595987e68982fed0d6 ./README.md
|
||||
41dfdc6d099b54f87d4dd51f696122b3c88d3bf3ddf420bea8f4bc621ba920b0 ./build.rs
|
||||
588657a906ebabbc248509a472aaf7eb8d5fb6549de5065027a75f61afe91708 ./docs/API.md
|
||||
3596e68d53d614ff784cdaa7a26eabd651cf02909da770bc863518f1218299a0 ./docs/API.md
|
||||
1b522e1b61643733accf0a45b8b862cfb96e1468343c9819600e263fe67a2b96 ./docs/CODE_AUDIT_0.12.0.md
|
||||
2e1e18fd8167dabfe2469c26e85cce62486c7cb6a502c63c6f6b0cd74d5885e0 ./docs/FLOW.md
|
||||
3ba861e16d523f962574334ed74d53d6be2669dcb05851578d7a5434e8856f4e ./docs/openapi.json
|
||||
@@ -98,15 +98,15 @@ b1c0861dfc568f88ec0f15d133d8ac4aacc699f3e6df1cd026e21f9c3814b1fe ./src/api/even
|
||||
5708667d1d009af3982414614aea6ed98014d11a41c9984c7c89283092963994 ./src/api/flows.rs
|
||||
d096000e94997cf9aaf9d3cc567214a78b8b2da7da57a76e2b3519247af6e592 ./src/api/groups.rs
|
||||
a13d4e217fe3ddaa73873ba6e0d1bc93750cf61764d867ff7372274ed21d9599 ./src/api/history.rs
|
||||
791c99a2cc3219f9db7f600df48bd2d839dcae3392e937fc7b31dd9c024afd3d ./src/api/house.rs
|
||||
d397e06b2034490b1238a8cf4663661a4e68c34d18a3037169e7332bd9e79cf2 ./src/api/house.rs
|
||||
88e04a59bfedd5e6c54e6a2938b1031964be3a1505db2ca67d6290aa042cbe3b ./src/api/integrations.rs
|
||||
bb2a746ecdcc2da5fe54e18b455c7bd19453486dd5c008e71951a2c81d0e7d64 ./src/api/middleware.rs
|
||||
45e34a447ff384d99a3c42c489ca9fa75849c74d4d246caa91c63d927de17396 ./src/api/openapi.rs
|
||||
a1d1a4ac071493b052e6bf20b03be67cf75726de95649e9a73aeba8d22395a15 ./src/api/schedules.rs
|
||||
f07425bad97da3fdc1a1a430ef8cf58651c6946fbc1fe8adaa48650567469fbe ./src/api/settings.rs
|
||||
c1275fb8fcd2b2ba24e9c6b1234f25ce6865517c792e97ad46e14ec8bb16ed83 ./src/api/settings.rs
|
||||
6f53b89c96a99a85c3badd6af169fda9c978630516279b57b756b5468caef7d7 ./src/api/system.rs
|
||||
681cccb8d09f4ad9c2e6467a4dbe2f9d991125775a5d2bfc9043daf940fecd29 ./src/api/websocket.rs
|
||||
20e0a7f8170247613fad996d5341d54b31a497a12893f2831d9fddd12583508d ./src/api/zones.rs
|
||||
525c4e546a611d26006f6414fc88ab4c6773171ed83bd1ca85644945139b5b06 ./src/api/zones.rs
|
||||
3cec9426989034a6a5074aead64e8c0239ae942a96a04910c57d1593129c5bb8 ./src/config.rs
|
||||
c8b8b4a04c94b9d91f5931057d69ad38344730bffbf68e2f6541b59013441b57 ./src/db.rs
|
||||
24580b279cfcd5388ba584eaba2c9bb729b8aae81e77b781c23fb804c5b5fa5d ./src/db/climate.rs
|
||||
@@ -136,7 +136,7 @@ a9188b588b2617ce1547a45d46141f7e5f1bb0027a48675dd86b274f807d0875 ./src/engine/t
|
||||
8502aed5bc180a1e2601c33c41e125edea30fdea93a870c5237cf85054fbf686 ./src/engine/temporary_thermostat.rs
|
||||
9da37fb636e2c342c4e86b6e0ecf07a5a6850431b1227cf4b8f02b4d05b02eaa ./src/engine/tests.rs
|
||||
986c5ce1d7d5e79975b0089807408109afdef5c5a173b427b58e34f534faf411 ./src/engine/zone_actions.rs
|
||||
e7ba1c1708865bc49e26d07ad84faa1803c0d4f1c23be5b11f61154de660858c ./src/engine/zone_control.rs
|
||||
7db75c2d40df2af3759d0bd242133612d4ff768c8f26db0009853d3dcad5ade6 ./src/engine/zone_control.rs
|
||||
4b271b6fc365b1078c01d6178eb563841b2ecaed5d8639196f58e1312d2236fe ./src/error.rs
|
||||
9eef7820fcf0c98b08fb1bf5e0a4a244b1dbdfa700d8b930d3ff40379babdada ./src/home_assistant.rs
|
||||
6f9ef85cd53ba030b477bc3c186f0f7e762674124210eabcb0686f2806eaada1 ./src/influxdb.rs
|
||||
|
||||
+3
-2
@@ -722,7 +722,7 @@ Valid modes: `cool`, `heat`, `off`.
|
||||
- `cool`/`heat` select the house rule used by zones that inherit the global mode and immediately re-run arbitration for free zones. Explicit local/group/direct ownership is preserved.
|
||||
- `off` means **do not perform house-level thermostat control** for inherited free zones. It does not block local thermostats, groups, device-manual control or controller automations.
|
||||
|
||||
Returns public runtime settings.
|
||||
Returns `{ "mode": "cool|heat|off" }`.
|
||||
|
||||
### `POST /api/house/power`
|
||||
|
||||
@@ -742,7 +742,6 @@ Response includes:
|
||||
"one_shot": true,
|
||||
"devices": [],
|
||||
"groups": [],
|
||||
"settings": {},
|
||||
"failed": []
|
||||
}
|
||||
```
|
||||
@@ -759,6 +758,8 @@ Valid: `auto`, `comfort`, `sleep`, `away`.
|
||||
|
||||
A non-`auto` preset creates overrides for free house-controlled zones and normally expires at each zone's next schedule boundary. `auto` clears those free-zone overrides. Explicit local thermostat, group, temporary thermostat and direct/manual ownership is not overwritten by a house profile action.
|
||||
|
||||
Response contains `preset`, the updated `zones`, current `devices`, and a `failed` array for immediate-control errors. It does not embed settings; settings are available only from the functional `/api/settings/*` resources.
|
||||
|
||||
---
|
||||
|
||||
## Schedules
|
||||
|
||||
@@ -217,7 +217,6 @@ async fn update_house_preset(State(state): State<AppState>, Json(input): Json<Ho
|
||||
"preset": input.preset,
|
||||
"zones": zones,
|
||||
"devices": devices,
|
||||
"settings": settings_payload,
|
||||
"failed": failed,
|
||||
})))
|
||||
}
|
||||
|
||||
+6
-6
@@ -69,7 +69,7 @@ fn home_assistant_settings(settings: &RuntimeSettings) -> HomeAssistantSettingsV
|
||||
}
|
||||
|
||||
async fn get_application_settings(State(state): State<AppState>) -> Json<ApplicationSettings> {
|
||||
Json(application_settings(&state.settings.read().await))
|
||||
Json(application_settings(&*state.settings.read().await))
|
||||
}
|
||||
|
||||
async fn update_application_settings(
|
||||
@@ -89,7 +89,7 @@ async fn update_application_settings(
|
||||
}
|
||||
|
||||
async fn get_gree_settings(State(state): State<AppState>) -> Json<GreeSettings> {
|
||||
Json(gree_settings(&state.settings.read().await))
|
||||
Json(gree_settings(&*state.settings.read().await))
|
||||
}
|
||||
|
||||
fn normalize_gree_settings(mut input: GreeSettings) -> Result<GreeSettings, AppError> {
|
||||
@@ -169,7 +169,7 @@ async fn update_gree_settings(
|
||||
}
|
||||
|
||||
async fn get_history_settings(State(state): State<AppState>) -> Json<HistorySettings> {
|
||||
Json(history_settings(&state.settings.read().await))
|
||||
Json(history_settings(&*state.settings.read().await))
|
||||
}
|
||||
|
||||
async fn update_history_settings(
|
||||
@@ -198,7 +198,7 @@ async fn update_history_settings(
|
||||
}
|
||||
|
||||
async fn get_influxdb_settings(State(state): State<AppState>) -> Json<InfluxDbSettingsView> {
|
||||
Json(influxdb_settings(&state.settings.read().await))
|
||||
Json(influxdb_settings(&*state.settings.read().await))
|
||||
}
|
||||
|
||||
fn apply_influxdb_update(current: &InfluxDbSettings, input: InfluxDbSettingsUpdate) -> Result<InfluxDbSettings, AppError> {
|
||||
@@ -238,7 +238,7 @@ async fn update_influxdb_settings(
|
||||
}
|
||||
|
||||
async fn get_notification_settings(State(state): State<AppState>) -> Json<NotificationSettingsView> {
|
||||
Json(notification_settings(&state.settings.read().await))
|
||||
Json(notification_settings(&*state.settings.read().await))
|
||||
}
|
||||
|
||||
fn apply_notification_update(current: &NotificationSettings, mut input: NotificationSettingsUpdate) -> Result<NotificationSettings, AppError> {
|
||||
@@ -320,7 +320,7 @@ async fn update_night_settings(
|
||||
}
|
||||
|
||||
async fn get_home_assistant_settings(State(state): State<AppState>) -> Json<HomeAssistantSettingsView> {
|
||||
Json(home_assistant_settings(&state.settings.read().await))
|
||||
Json(home_assistant_settings(&*state.settings.read().await))
|
||||
}
|
||||
|
||||
fn normalize_sensor_aliases(settings: &mut HomeAssistantSettings) {
|
||||
|
||||
+2
-2
@@ -140,7 +140,7 @@ async fn create_zone(State(state): State<AppState>, Json(input): Json<ZoneInput>
|
||||
let _device_guard = state.lock_device_operation(&input.device_id).await;
|
||||
let mut zone = input.into_zone(Uuid::new_v4().to_string(), Utc::now());
|
||||
let settings = state.settings.read().await.clone();
|
||||
canonicalize_zone_ha_entity(&mut zone, &settings);
|
||||
canonicalize_zone_ha_entity(&mut zone, &settings.home_assistant);
|
||||
state.db.save_zone(&zone)?;
|
||||
state.broadcast("zone.created", serde_json::to_value(&zone)?);
|
||||
state.wake_zone_control();
|
||||
@@ -227,7 +227,7 @@ async fn update_zone(State(state): State<AppState>, Path(id): Path<String>, Json
|
||||
zone.revision = existing.revision.saturating_add(1);
|
||||
}
|
||||
let settings = state.settings.read().await.clone();
|
||||
canonicalize_zone_ha_entity(&mut zone, &settings);
|
||||
canonicalize_zone_ha_entity(&mut zone, &settings.home_assistant);
|
||||
let power_off_device = !device_changed && existing.enabled && !zone.enabled;
|
||||
if power_off_device {
|
||||
// Full configuration PUT and quick-control disable use the same ownership cleanup.
|
||||
|
||||
@@ -461,7 +461,7 @@ async fn control_zones(state: &AppState) -> Result<()> {
|
||||
zone.active_preset = preset;
|
||||
zone.effective_setpoint = Some(target);
|
||||
|
||||
let Some(temp) = temperature else {
|
||||
let Some(temp) = zone.current_temperature else {
|
||||
record_zone_history(state, &zone, outdoor_temperature, settings.poll_interval_seconds);
|
||||
let persisted_zone = persist_zone_cycle(state, &zone, cycle_started_at)?;
|
||||
state.broadcast("zone.updated", serde_json::to_value(&persisted_zone)?);
|
||||
|
||||
Reference in New Issue
Block a user