dm_mac.views.machine module¶
Views related to machine endpoints.
- async dm_mac.views.machine.locked_out(machine_name: str) Tuple[Response, int]¶
Set or clear machine lockout state.
POST to lock out a machine (prevent all use). DELETE to unlock the machine.
- async dm_mac.views.machine.oops(machine_name: str) Tuple[Response, int]¶
Set or clear machine Oops state.
POST to set the machine into Oops (maintenance needed) state. DELETE to clear the Oops state.
- async dm_mac.views.machine.update() Tuple[Response, int]¶
API method to update machine state.
Accepts POSTed JSON containing the following key/value pairs:
machine_name(string) - name of the machine sending the updateoops(boolean) - whether the oops button is pressedrfid_value(string) - value of the RFID fob/card that is currentlypresent in the machine, or empty string if none present. Note that ESPHome strips leading zeroes from this, so inside this method it is left-padded with zeroes to a length of 10 characters.
uptime(float) - uptime of the ESP32 (MCU).wifi_signal_db(float) - WiFi signal strength in dBwifi_signal_percent(float) - WiFi signal strength in percentinternal_temperature_c(float) - internal temperature of the ESP32 in°C.
amps(float; optional) - amperage value from the current clampammeter, if present, or 0.0 otherwise.