Skip to content

Commit

Permalink
🔋 add energy for qmi.plug.2a1c1 (#826)
Browse files Browse the repository at this point in the history
  • Loading branch information
parkghost authored Oct 10, 2022
1 parent b19dceb commit 06d6ab6
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion custom_components/xiaomi_miot/core/device_customizes.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,40 @@
'select_properties': 'mode,rgb_order',
'number_properties': 'numleds,pixel_per_step,fade_delay,step_delay,stair_travel_time',
},

'qmi.plug.2a1c1': {
'main_miot_services': 'switch-2',
'sensor_attributes': 'power_cost_today,power_cost_month',
'stat_power_cost_key': '3.1',
},
'qmi.plug.2a1c1:electric_power': {
'unit_of_measurement': 'W',
},
'qmi.plug.2a1c1:electric_current': {
'value_ratio': 0.001,
'unit_of_measurement': 'A',
},
'qmi.plug.2a1c1:voltage': {
'value_ratio': 0.001,
'unit_of_measurement': 'V',
},
'qmi.plug.2a1c1:power_consumption': {
'value_ratio': 1,
'state_class': "total_increasing",
'device_class': "energy",
'unit_of_measurement': "kWh",
},
'qmi.plug.2a1c1:power_cost_today': {
'value_ratio': 1,
'state_class': 'total_increasing',
'device_class': 'energy',
'unit_of_measurement': 'kWh',
},
'qmi.plug.2a1c1:power_cost_month': {
'value_ratio': 1,
'state_class': 'total_increasing',
'device_class': 'energy',
'unit_of_measurement': 'kWh',
},
'qushui.bed.001': {
'chunk_properties': 1,
},
Expand Down

0 comments on commit 06d6ab6

Please # to comment.