Skip to content

Commit

Permalink
Fix for HHCCPOT02 entities
Browse files Browse the repository at this point in the history
  • Loading branch information
Magalex2x14 committed Jan 22, 2020
1 parent 8912429 commit 25480e3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion custom_components/mitemp_bt/sensor.py
Original file line number Diff line number Diff line change
@@ -375,8 +375,16 @@ def discover_ble_devices(config):
ConductivitySensor(mac),
IlluminanceSensor(mac),
]
if stype[mac] == "HHCCPOT002":
sensors = [
MoistureSensor(mac),
ConductivitySensor(mac)
]
else:
sensors = [TemperatureSensor(mac), HumiditySensor(mac)]
sensors = [
TemperatureSensor(mac),
HumiditySensor(mac)
]
sensors_by_mac[mac] = sensors
add_entities(sensors)
for sensor in sensors:

0 comments on commit 25480e3

Please sign in to comment.