Skip to content

Commit

Permalink
Return spaces in attribute names
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Nov 3, 2020
1 parent 853f2a3 commit 1272543
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
30 changes: 15 additions & 15 deletions custom_components/xiaomi_gateway3/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
['8.0.2111', None, 'pair_command', None], # add new device
['8.0.2155', None, 'cloud', None], # {"cloud_link":0}
[None, None, 'pair', 'remote'],
[None, None, 'firmware_lock', 'switch'], # firmware lock
[None, None, 'firmware lock', 'switch'], # firmware lock
]
}, {
# on/off, power measurement
Expand Down Expand Up @@ -68,8 +68,8 @@
['0.12.85', 'load_power', 'power', 'sensor'],
['0.13.85', None, 'consumption', 'sensor'],
# ['0.14.85', None, '?', 'sensor'], # 5.01, 6.13
['4.1.85', 'channel_0', 'channel_1', 'switch'],
['4.2.85', 'channel_1', 'channel_2', 'switch'],
['4.1.85', 'channel_0', 'channel 1', 'switch'],
['4.2.85', 'channel 1', 'channel 2', 'switch'],
# [?, 'enable_motor_mode', 'interlock', None]
['13.1.85', None, 'button_1', None],
['13.2.85', None, 'button_2', None],
Expand All @@ -87,17 +87,17 @@
# dual channel on/off
'lumi.ctrl_neutral2': ["Aqara", "Wall Double Switch", "QBKG03LM"],
'params': [
['4.1.85', 'neutral_0', 'channel_1', 'switch'], # to4ko
['4.2.85', 'neutral_1', 'channel_2', 'switch'],
['4.1.85', 'neutral_0', 'channel 1', 'switch'], # to4ko
['4.2.85', 'neutral_1', 'channel 2', 'switch'],
['13.1.85', None, 'button_1', None],
['13.2.85', None, 'button_2', None],
[None, None, 'action', 'sensor'],
]
}, {
'lumi.switch.b2lacn02': ["Aqara", "D1 Wall Double Switch", "QBKG22LM"],
'params': [
['4.1.85', 'channel_0', 'channel_1', 'switch'],
['4.2.85', 'channel_1', 'channel_2', 'switch'],
['4.1.85', 'channel_0', 'channel 1', 'switch'],
['4.2.85', 'channel 1', 'channel 2', 'switch'],
['13.1.85', None, 'button_1', None],
['13.2.85', None, 'button_2', None],
[None, None, 'action', 'sensor'],
Expand All @@ -106,9 +106,9 @@
# triple channel on/off, no neutral wire
'lumi.switch.l3acn3': ["Aqara", "D1 Wall Triple Switch", "QBKG25LM"],
'params': [
['4.1.85', 'neutral_0', 'channel_1', 'switch'], # to4ko
['4.2.85', 'neutral_1', 'channel_2', 'switch'],
['4.3.85', 'neutral_2', 'channel_3', 'switch'],
['4.1.85', 'neutral_0', 'channel 1', 'switch'], # to4ko
['4.2.85', 'neutral_1', 'channel 2', 'switch'],
['4.3.85', 'neutral_2', 'channel 3', 'switch'],
['13.1.85', None, 'button_1', None],
['13.2.85', None, 'button_2', None],
['13.3.85', None, 'button_3', None],
Expand All @@ -120,9 +120,9 @@
'params': [
['0.12.85', 'load_power', 'power', 'sensor'],
['0.13.85', None, 'consumption', 'sensor'],
['4.1.85', 'channel_0', 'channel_1', 'switch'],
['4.2.85', 'channel_1', 'channel_2', 'switch'],
['4.3.85', 'channel_2', 'channel_3', 'switch'],
['4.1.85', 'channel_0', 'channel 1', 'switch'],
['4.2.85', 'channel 1', 'channel 2', 'switch'],
['4.3.85', 'channel 2', 'channel 3', 'switch'],
['13.1.85', None, 'button_1', None],
['13.2.85', None, 'button_2', None],
['13.3.85', None, 'button_3', None],
Expand Down Expand Up @@ -264,14 +264,14 @@
}, {
'lumi.sensor_smoke': ["Honeywell", "Smoke Sensor", "JTYJ-GD-01LM/BW"],
'params': [
['0.1.85', 'density', 'smoke_density', 'sensor'],
['0.1.85', 'density', 'smoke density', 'sensor'],
['13.1.85', 'alarm', 'smoke', 'binary_sensor'],
['8.0.2001', 'battery', 'battery', 'sensor'],
]
}, {
'lumi.sensor_natgas': ["Honeywell", "Gas Sensor", "JTQJ-BF-01LM/BW"],
'params': [
['0.1.85', 'density', 'gas_density', 'sensor'],
['0.1.85', 'density', 'gas density', 'sensor'],
['13.1.85', 'alarm', 'gas', 'binary_sensor'],
['8.0.2001', 'battery', 'battery', 'sensor'],
]
Expand Down
8 changes: 4 additions & 4 deletions custom_components/xiaomi_gateway3/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
DEVICE_CLASS_TEMPERATURE: TEMP_CELSIUS,
'conductivity': "µS/cm",
'consumption': ENERGY_WATT_HOUR,
'gas_density': '% LEL',
'smoke_density': '% obs/ft',
'gas density': '% LEL',
'smoke density': '% obs/ft',
'moisture': '%',
}

ICONS = {
'conductivity': 'mdi:flower',
'consumption': 'mdi:flash',
'gas_density': 'mdi:google-circles-communities',
'gas density': 'mdi:google-circles-communities',
'moisture': 'mdi:water-percent',
'smoke_density': 'mdi:google-circles-communities',
'smoke density': 'mdi:google-circles-communities',
}


Expand Down

0 comments on commit 1272543

Please sign in to comment.