mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-16 18:39:09 -07:00
Don’t use unsupported json_attributes binary_sensor attribute. https://github.com/Koenkk/zigbee2mqtt/issues/605
This commit is contained in:
parent
dcb75b19d3
commit
3f49e2e596
@ -12,7 +12,6 @@ const configurations = {
|
||||
payload_off: false,
|
||||
value_template: '{{ value_json.occupancy }}',
|
||||
device_class: 'motion',
|
||||
json_attributes: ['linkquality', 'battery', 'voltage'],
|
||||
},
|
||||
},
|
||||
'binary_sensor_presence': {
|
||||
@ -23,7 +22,6 @@ const configurations = {
|
||||
payload_off: false,
|
||||
value_template: '{{ value_json.presence }}',
|
||||
device_class: 'presence',
|
||||
json_attributes: ['battery', 'voltage', 'action'],
|
||||
},
|
||||
},
|
||||
'binary_sensor_contact': {
|
||||
@ -34,7 +32,6 @@ const configurations = {
|
||||
payload_off: true,
|
||||
value_template: '{{ value_json.contact }}',
|
||||
device_class: 'door',
|
||||
json_attributes: ['linkquality', 'battery', 'voltage'],
|
||||
},
|
||||
},
|
||||
'binary_sensor_water_leak': {
|
||||
@ -45,7 +42,6 @@ const configurations = {
|
||||
payload_off: false,
|
||||
value_template: '{{ value_json.water_leak }}',
|
||||
device_class: 'moisture',
|
||||
json_attributes: ['linkquality', 'battery', 'voltage'],
|
||||
},
|
||||
},
|
||||
'binary_sensor_smoke': {
|
||||
@ -56,7 +52,6 @@ const configurations = {
|
||||
payload_off: false,
|
||||
value_template: '{{ value_json.smoke }}',
|
||||
device_class: 'smoke',
|
||||
json_attributes: ['linkquality', 'battery', 'voltage'],
|
||||
},
|
||||
},
|
||||
'binary_sensor_gas': {
|
||||
@ -67,7 +62,6 @@ const configurations = {
|
||||
payload_off: false,
|
||||
value_template: '{{ value_json.gas }}',
|
||||
device_class: 'gas',
|
||||
json_attributes: ['linkquality', 'sensitivity'],
|
||||
},
|
||||
},
|
||||
'binary_sensor_router': {
|
||||
@ -78,7 +72,6 @@ const configurations = {
|
||||
payload_off: false,
|
||||
value_template: '{{ value_json.state }}',
|
||||
device_class: 'connectivity',
|
||||
json_attributes: ['linkquality', 'description', 'type', 'rssi'],
|
||||
},
|
||||
},
|
||||
|
||||
@ -175,6 +168,23 @@ const configurations = {
|
||||
json_attributes: ['linkquality', 'forgotten', 'keyerror'],
|
||||
},
|
||||
},
|
||||
'sensor_battery': {
|
||||
type: 'sensor',
|
||||
object_id: 'battery',
|
||||
discovery_payload: {
|
||||
device_class: 'battery',
|
||||
value_template: '{{ value_json.battery }}',
|
||||
json_attributes: ['linkquality', 'voltage', 'action', 'sensitivity'],
|
||||
},
|
||||
},
|
||||
'sensor_linkquality': {
|
||||
type: 'sensor',
|
||||
object_id: 'linkquality',
|
||||
discovery_payload: {
|
||||
value_template: '{{ value_json.linkquality }}',
|
||||
json_attributes: ['description', 'type', 'rssi'],
|
||||
},
|
||||
},
|
||||
|
||||
// Light
|
||||
'light_brightness_colortemp_colorxy': {
|
||||
@ -257,11 +267,11 @@ const mapping = {
|
||||
'QBKG03LM': [switchWithPostfix('left'), switchWithPostfix('right')],
|
||||
'WSDCGQ01LM': [configurations.sensor_temperature, configurations.sensor_humidity],
|
||||
'WSDCGQ11LM': [configurations.sensor_temperature, configurations.sensor_humidity, configurations.sensor_pressure],
|
||||
'RTCGQ01LM': [configurations.binary_sensor_occupancy],
|
||||
'RTCGQ11LM': [configurations.binary_sensor_occupancy, configurations.sensor_illuminance],
|
||||
'MCCGQ01LM': [configurations.binary_sensor_contact],
|
||||
'MCCGQ11LM': [configurations.binary_sensor_contact],
|
||||
'SJCGQ11LM': [configurations.binary_sensor_water_leak],
|
||||
'RTCGQ01LM': [configurations.binary_sensor_occupancy, configurations.sensor_battery],
|
||||
'RTCGQ11LM': [configurations.binary_sensor_occupancy, configurations.sensor_illuminance, configurations.sensor_battery],
|
||||
'MCCGQ01LM': [configurations.binary_sensor_contact, configurations.sensor_battery],
|
||||
'MCCGQ11LM': [configurations.binary_sensor_contact, configurations.sensor_battery],
|
||||
'SJCGQ11LM': [configurations.binary_sensor_water_leak, configurations.sensor_battery],
|
||||
'MFKZQ01LM': [configurations.sensor_action],
|
||||
'ZNCZ02LM': [configurations.switch, configurations.sensor_power],
|
||||
'QBCZ11LM': [configurations.switch, configurations.sensor_power],
|
||||
@ -274,9 +284,9 @@ const mapping = {
|
||||
'7299760PH': [configurations.light_brightness_colorxy],
|
||||
'7146060PH': [configurations.light_brightness_colortemp_colorxy],
|
||||
'F7C033': [configurations.light_brightness],
|
||||
'JTYJ-GD-01LM/BW': [configurations.binary_sensor_smoke],
|
||||
'JTYJ-GD-01LM/BW': [configurations.binary_sensor_smoke, configurations.sensor_battery],
|
||||
'PLUG EDP RE:DY': [configurations.switch, configurations.sensor_power],
|
||||
'CC2530.ROUTER': [configurations.binary_sensor_router],
|
||||
'CC2530.ROUTER': [configurations.binary_sensor_router, configurations.sensor_linkquality],
|
||||
'AA70155': [configurations.light_brightness_colortemp],
|
||||
'4058075816718': [configurations.light_brightness_colortemp_colorxy],
|
||||
'AA69697': [configurations.light_brightness_colortemp_colorxy],
|
||||
@ -328,10 +338,10 @@ const mapping = {
|
||||
'324131092621': [configurations.sensor_action],
|
||||
'9290012607': [
|
||||
configurations.binary_sensor_occupancy, configurations.sensor_temperature,
|
||||
configurations.sensor_illuminance,
|
||||
configurations.sensor_illuminance, configurations.sensor_battery,
|
||||
],
|
||||
'GL-C-008': [configurations.light_brightness_colortemp_colorxy],
|
||||
'STSS-MULT-001': [configurations.binary_sensor_contact],
|
||||
'STSS-MULT-001': [configurations.binary_sensor_contact, configurations.sensor_battery],
|
||||
'E11-G23/E11-G33': [configurations.light_brightness],
|
||||
'AC03645': [configurations.light_brightness_colortemp_colorxy],
|
||||
'AC03641': [configurations.light_brightness],
|
||||
@ -351,9 +361,9 @@ const mapping = {
|
||||
'Z01-CIA19NAE26': [configurations.light_brightness],
|
||||
'E11-N1EA': [configurations.light_brightness_colortemp_colorxy],
|
||||
'74283': [configurations.light_brightness],
|
||||
'JTQJ-BF-01LM/BW': [configurations.binary_sensor_gas],
|
||||
'JTQJ-BF-01LM/BW': [configurations.binary_sensor_gas, configurations.sensor_battery],
|
||||
'50045': [configurations.light_brightness],
|
||||
'AV2010/22': [configurations.binary_sensor_occupancy],
|
||||
'AV2010/22': [configurations.binary_sensor_occupancy, configurations.sensor_battery],
|
||||
'3210-L': [configurations.switch],
|
||||
'7299355PH': [configurations.light_brightness_colorxy],
|
||||
'45857GE': [configurations.light_brightness],
|
||||
@ -374,7 +384,7 @@ const mapping = {
|
||||
'MG-AUWS01': [switchWithPostfix('left'), switchWithPostfix('right')],
|
||||
'9290002579A': [configurations.light_brightness_colortemp_colorxy],
|
||||
'4256251-RZHAC': [configurations.switch, configurations.sensor_power],
|
||||
'STS-PRS-251': [configurations.binary_sensor_presence],
|
||||
'STS-PRS-251': [configurations.binary_sensor_presence, configurations.sensor_battery],
|
||||
'4058075816794': [configurations.light_brightness_colortemp],
|
||||
'4052899926158': [configurations.light_brightness],
|
||||
'4058075036185': [configurations.light_brightness_colortemp_colorxy],
|
||||
|
Loading…
Reference in New Issue
Block a user