This seems to be the most common configuration for smart plugs, and many have additional features. Add some common read-only attributes as optional so they will be available to read if the switch has them.
@@ -28,6 +28,30 @@ primary_entity:
read-only: true
mapping:
- scale: 10
+ - id: 21
+ type: bitfield
+ name: factory_test
+ optional: true
+ - id: 22
+ type: integer
+ name: voltage_calibration
+ - id: 23
+ name: current_calibration
+ - id: 24
+ name: power_calibration
+ - id: 25
+ name: energy_calibration
+ - id: 26
+ name: fault_code
secondary_entities:
- entity: sensor
category: diagnostic