Add the route to update a relay

This commit is contained in:
2024-08-31 20:26:16 +02:00
parent b0023a5167
commit bbe128e055
6 changed files with 88 additions and 15 deletions

View File

@ -92,11 +92,11 @@ pub struct DeviceRelay {
#[serde(default)]
pub id: DeviceRelayID,
/// Human-readable name for the relay
name: String,
pub name: String,
/// Whether this relay can be turned on or not
enabled: bool,
pub enabled: bool,
/// Relay priority when selecting relays to turn on. 0 = lowest priority
priority: usize,
pub priority: usize,
/// Estimated consumption of the electrical equipment triggered by the relay
consumption: usize,
/// Minimal time this relay shall be left on before it can be turned off (in seconds)