mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Add Analog cluster for Lumi plugs (#43817)
This commit is contained in:
parent
0ee86ea8e4
commit
032d569cd1
@ -145,6 +145,11 @@ class Sensor(ZhaEntity):
|
||||
return round(float(value * self._multiplier) / self._divisor)
|
||||
|
||||
|
||||
@STRICT_MATCH(
|
||||
channel_names=CHANNEL_ANALOG_INPUT,
|
||||
manufacturers="LUMI",
|
||||
models={"lumi.plug", "lumi.plug.maus01", "lumi.plug.mmeu01"},
|
||||
)
|
||||
@STRICT_MATCH(channel_names=CHANNEL_ANALOG_INPUT, manufacturers="Digi")
|
||||
class AnalogInput(Sensor):
|
||||
"""Sensor that displays analog input values."""
|
||||
|
@ -1372,10 +1372,22 @@ DEVICES = [
|
||||
},
|
||||
},
|
||||
"entities": [
|
||||
"sensor.lumi_lumi_plug_maus01_77665544_analog_input",
|
||||
"sensor.lumi_lumi_plug_maus01_77665544_analog_input_2",
|
||||
"sensor.lumi_lumi_plug_maus01_77665544_electrical_measurement",
|
||||
"switch.lumi_lumi_plug_maus01_77665544_on_off",
|
||||
],
|
||||
"entity_map": {
|
||||
("sensor", "00:11:22:33:44:55:66:77-2-12"): {
|
||||
"channels": ["analog_input"],
|
||||
"entity_class": "AnalogInput",
|
||||
"entity_id": "sensor.lumi_lumi_plug_maus01_77665544_analog_input",
|
||||
},
|
||||
("sensor", "00:11:22:33:44:55:66:77-3-12"): {
|
||||
"channels": ["analog_input"],
|
||||
"entity_class": "AnalogInput",
|
||||
"entity_id": "sensor.lumi_lumi_plug_maus01_77665544_analog_input_2",
|
||||
},
|
||||
("switch", "00:11:22:33:44:55:66:77-1"): {
|
||||
"channels": ["on_off"],
|
||||
"entity_class": "Switch",
|
||||
|
Loading…
x
Reference in New Issue
Block a user