Tuya MG-ZG01W
| Model | MG-ZG01W |
| Vendor | Tuya |
| Description | 1 gang switch with power meter |
| Exposes | switch (state), countdown, voltage, current, power, power_on_behavior, backlight_mode |
| Picture | ![]() |
Options
How to use device type specific configuration
voltage_calibration: Calibrates the voltage value (percentual offset), takes into effect on next report of device. The value must be a number.voltage_precision: Number of digits after decimal point for voltage, takes into effect on next report of device. This option can only decrease the precision, not increase it. The value must be a number with a minimum value of0and with a with a maximum value of3current_calibration: Calibrates the current value (percentual offset), takes into effect on next report of device. The value must be a number.current_precision: Number of digits after decimal point for current, takes into effect on next report of device. This option can only decrease the precision, not increase it. The value must be a number with a minimum value of0and with a with a maximum value of3power_calibration: Calibrates the power value (percentual offset), takes into effect on next report of device. The value must be a number.power_precision: Number of digits after decimal point for power, takes into effect on next report of device. This option can only decrease the precision, not increase it. The value must be a number with a minimum value of0and with a with a maximum value of3
Exposes
Switch
The current state of this switch is in the published state under the state property (value is ON or OFF). To control this switch publish a message to topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"state": "ON"}, {"state": "OFF"} or {"state": "TOGGLE"}. It's not possible to read (/get) this value.
Countdown (numeric)
Countdown to turn device off after a certain time. Value can be found in the published state on the countdown property. It's not possible to read (/get) this value. To write (/set) a value publish a message to topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"countdown": NEW_VALUE}. The minimal value is 0 and the maximum value is 43200. The unit of this value is s.
Voltage (numeric)
Measured electrical potential value. Value can be found in the published state on the voltage property. It's not possible to read (/get) or write (/set) this value. The unit of this value is V.
Current (numeric)
Instantaneous measured electrical current. Value can be found in the published state on the current property. It's not possible to read (/get) or write (/set) this value. The unit of this value is A.
Power (numeric)
Instantaneous measured power. Value can be found in the published state on the power property. It's not possible to read (/get) or write (/set) this value. The unit of this value is W.
Power-on behavior (enum)
Controls the behavior when the device is powered on after power loss. Value can be found in the published state on the power_on_behavior property. It's not possible to read (/get) this value. To write (/set) a value publish a message to topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"power_on_behavior": NEW_VALUE}. The possible values are: off, previous, on.
Backlight mode (binary)
Mode of the backlight. Value can be found in the published state on the backlight_mode property. It's not possible to read (/get) this value. To write (/set) a value publish a message to topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"backlight_mode": NEW_VALUE}. If value equals ON backlight mode is ON, if OFF OFF.

