Skip to content

Commit

Permalink
Fix binary sensors state_class to be None
Browse files Browse the repository at this point in the history
  • Loading branch information
garbled1 committed Oct 16, 2021
1 parent 53ed6b8 commit 8a3a338
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions custom_components/ecowitt/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,13 +510,13 @@
TYPE_SENSOR, None, "mdi:ruler", S_IMPERIAL,
STATE_CLASS_MEASUREMENT),
TYPE_LEAK_CH1: ("Leak Detection 1", LEAK_DETECTED, TYPE_BINARY_SENSOR,
DEVICE_CLASS_MOISTURE, "mdi:leak", 0, 0),
DEVICE_CLASS_MOISTURE, "mdi:leak", 0, None),
TYPE_LEAK_CH2: ("Leak Detection 2", LEAK_DETECTED, TYPE_BINARY_SENSOR,
DEVICE_CLASS_MOISTURE, "mdi:leak", 0, 0),
DEVICE_CLASS_MOISTURE, "mdi:leak", 0, None),
TYPE_LEAK_CH3: ("Leak Detection 3", LEAK_DETECTED, TYPE_BINARY_SENSOR,
DEVICE_CLASS_MOISTURE, "mdi:leak", 0, 0),
DEVICE_CLASS_MOISTURE, "mdi:leak", 0, None),
TYPE_LEAK_CH4: ("Leak Detection 4", LEAK_DETECTED, TYPE_BINARY_SENSOR,
DEVICE_CLASS_MOISTURE, "mdi:leak", 0, 0),
DEVICE_CLASS_MOISTURE, "mdi:leak", 0, None),
TYPE_CO2_PM25: ("WH45 PM2.5", CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
TYPE_SENSOR, None, "mdi:eye", 0, STATE_CLASS_MEASUREMENT),
TYPE_CO2_PM25_AVG_24H: ("WH45 PM2.5 24h average",
Expand Down Expand Up @@ -545,17 +545,17 @@
DEVICE_CLASS_BATTERY, "mdi:battery", 0,
STATE_CLASS_MEASUREMENT),
TYPE_WH25BATT: ("WH25 Battery", "BATT", TYPE_BINARY_SENSOR,
DEVICE_CLASS_BATTERY, "mdi:battery", 0, 0),
DEVICE_CLASS_BATTERY, "mdi:battery", 0, None),
TYPE_WH26BATT: ("WH26 Battery", "BATT", TYPE_BINARY_SENSOR,
DEVICE_CLASS_BATTERY, "mdi:battery", 0, 0),
DEVICE_CLASS_BATTERY, "mdi:battery", 0, None),
TYPE_WH40BATT: ("WH40 Battery", ELECTRIC_POTENTIAL_VOLT, TYPE_SENSOR,
DEVICE_CLASS_VOLTAGE, "mdi:battery", 0,
STATE_CLASS_MEASUREMENT),
TYPE_WH57BATT: ("WH57 Battery", PERCENTAGE, TYPE_SENSOR,
DEVICE_CLASS_BATTERY, "mdi:battery", 0,
STATE_CLASS_MEASUREMENT),
TYPE_WH65BATT: ("WH65 Battery", "BATT", TYPE_BINARY_SENSOR,
DEVICE_CLASS_BATTERY, "mdi:battery", 0, 0),
DEVICE_CLASS_BATTERY, "mdi:battery", 0, None),
TYPE_WH68BATT: ("WH68 Battery", ELECTRIC_POTENTIAL_VOLT, TYPE_SENSOR,
DEVICE_CLASS_BATTERY, "mdi:battery", 0,
STATE_CLASS_MEASUREMENT),
Expand Down Expand Up @@ -587,21 +587,21 @@
TYPE_SENSOR, DEVICE_CLASS_VOLTAGE, "mdi:battery", 0,
STATE_CLASS_MEASUREMENT),
TYPE_BATTERY1: ("Battery 1", "BATT", TYPE_BINARY_SENSOR,
DEVICE_CLASS_BATTERY, "mdi:battery", 0, 0),
DEVICE_CLASS_BATTERY, "mdi:battery", 0, None),
TYPE_BATTERY2: ("Battery 2", "BATT", TYPE_BINARY_SENSOR,
DEVICE_CLASS_BATTERY, "mdi:battery", 0, 0),
DEVICE_CLASS_BATTERY, "mdi:battery", 0, None),
TYPE_BATTERY3: ("Battery 3", "BATT", TYPE_BINARY_SENSOR,
DEVICE_CLASS_BATTERY, "mdi:battery", 0, 0),
DEVICE_CLASS_BATTERY, "mdi:battery", 0, None),
TYPE_BATTERY4: ("Battery 4", "BATT", TYPE_BINARY_SENSOR,
DEVICE_CLASS_BATTERY, "mdi:battery", 0, 0),
DEVICE_CLASS_BATTERY, "mdi:battery", 0, None),
TYPE_BATTERY5: ("Battery 5", "BATT", TYPE_BINARY_SENSOR,
DEVICE_CLASS_BATTERY, "mdi:battery", 0, 0),
DEVICE_CLASS_BATTERY, "mdi:battery", 0, None),
TYPE_BATTERY6: ("Battery 6", "BATT", TYPE_BINARY_SENSOR,
DEVICE_CLASS_BATTERY, "mdi:battery", 0, 0),
DEVICE_CLASS_BATTERY, "mdi:battery", 0, None),
TYPE_BATTERY7: ("Battery 7", "BATT", TYPE_BINARY_SENSOR,
DEVICE_CLASS_BATTERY, "mdi:battery", 0, 0),
DEVICE_CLASS_BATTERY, "mdi:battery", 0, None),
TYPE_BATTERY8: ("Battery 8", "BATT", TYPE_BINARY_SENSOR,
DEVICE_CLASS_BATTERY, "mdi:battery", 0, 0),
DEVICE_CLASS_BATTERY, "mdi:battery", 0, None),
TYPE_PM25BATT1: ("PM2.5 1 Battery", PERCENTAGE, TYPE_SENSOR,
DEVICE_CLASS_BATTERY, "mdi:battery", 0,
STATE_CLASS_MEASUREMENT),
Expand Down

0 comments on commit 8a3a338

Please sign in to comment.