v0.14.0
This commit is contained in:
+38
-1
@@ -4,7 +4,9 @@ use crate::{
|
||||
home_assistant, influxdb,
|
||||
models::{
|
||||
ApiTokenInfo, ApplicationSettings, Automation, ClimateGroup, ConfigurationExport,
|
||||
DebugSettings, Device, DeviceCommand, DevicePatch, DiscoveryRequest, Flow, GreeSettings,
|
||||
ConnectionStatus, ConnectionType, DebugSettings, Device, DeviceCommand, DevicePatch, DiscoveryRequest,
|
||||
EnergySourcePreference, Flow, GreeSettings,
|
||||
GreeCloudSettings, GreeCloudSettingsUpdate, GreeCloudSettingsView,
|
||||
GroupControlPatch, HaReading, HistorySettings, HomeAssistantSettings,
|
||||
HomeAssistantSettingsUpdate, HomeAssistantSettingsView, InfluxDbSettings,
|
||||
InfluxDbSettingsUpdate, InfluxDbSettingsView, ManualDeviceRequest, NightModeSettings,
|
||||
@@ -74,6 +76,7 @@ const SPA_ROUTES: &[&str] = &[
|
||||
"/history/overview",
|
||||
"/history/zones",
|
||||
"/history/devices",
|
||||
"/history/energy",
|
||||
"/history/sensors",
|
||||
"/history/custom",
|
||||
];
|
||||
@@ -147,6 +150,7 @@ pub fn router(state: AppState) -> Router {
|
||||
)
|
||||
.route("/api/readings", get(readings))
|
||||
.route("/api/history", get(history))
|
||||
.route("/api/history/energy", get(energy_history))
|
||||
.route("/api/control-plan", get(control_plan))
|
||||
.route("/api/events", get(events))
|
||||
.route(
|
||||
@@ -157,6 +161,10 @@ pub fn router(state: AppState) -> Router {
|
||||
"/api/settings/gree",
|
||||
get(get_gree_settings).put(update_gree_settings),
|
||||
)
|
||||
.route(
|
||||
"/api/settings/gree-cloud",
|
||||
get(get_gree_cloud_settings).put(update_gree_cloud_settings),
|
||||
)
|
||||
.route(
|
||||
"/api/settings/history",
|
||||
get(get_history_settings).put(update_history_settings),
|
||||
@@ -191,6 +199,30 @@ pub fn router(state: AppState) -> Router {
|
||||
"/api/access-tokens/:id",
|
||||
axum::routing::delete(delete_access_token),
|
||||
)
|
||||
.route(
|
||||
"/api/integrations/gree-cloud/test",
|
||||
post(test_gree_cloud),
|
||||
)
|
||||
.route(
|
||||
"/api/integrations/gree-cloud/devices",
|
||||
get(discover_gree_cloud_devices),
|
||||
)
|
||||
.route(
|
||||
"/api/integrations/gree-cloud/devices/:cloud_id/add",
|
||||
post(add_gree_cloud_device),
|
||||
)
|
||||
.route(
|
||||
"/api/integrations/gree-cloud/status",
|
||||
get(gree_cloud_status),
|
||||
)
|
||||
.route(
|
||||
"/api/integrations/gree-cloud/reconnect",
|
||||
post(reconnect_gree_cloud),
|
||||
)
|
||||
.route(
|
||||
"/api/devices/:id/cloud-diagnostics",
|
||||
get(cloud_device_diagnostics),
|
||||
)
|
||||
.route(
|
||||
"/api/integrations/home-assistant/test",
|
||||
post(test_home_assistant),
|
||||
@@ -199,6 +231,10 @@ pub fn router(state: AppState) -> Router {
|
||||
"/api/integrations/home-assistant/entity",
|
||||
post(inspect_home_assistant_entity),
|
||||
)
|
||||
.route(
|
||||
"/api/integrations/home-assistant/energy-sensors",
|
||||
get(list_home_assistant_energy_sensors),
|
||||
)
|
||||
.route(
|
||||
"/api/integrations/notifications/test",
|
||||
post(test_notifications),
|
||||
@@ -320,6 +356,7 @@ include!("api/settings.rs");
|
||||
include!("api/configuration.rs");
|
||||
include!("api/debug_tokens.rs");
|
||||
include!("api/integrations.rs");
|
||||
include!("api/gree_cloud.rs");
|
||||
include!("api/middleware.rs");
|
||||
include!("api/websocket.rs");
|
||||
include!("api/assets.rs");
|
||||
|
||||
Reference in New Issue
Block a user