Place smappee supported configurations after device class (#37595)

This commit is contained in:
bsmappee 2020-07-07 16:15:52 +02:00 committed by GitHub
parent 76be95d7e0
commit 6b97b4f5ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,48 +88,48 @@ VOLTAGE_SENSORS = {
"mdi:flash", "mdi:flash",
VOLT, VOLT,
"phase_voltage_a", "phase_voltage_a",
["ONE", "TWO", "THREE_STAR", "THREE_DELTA"],
None, None,
["ONE", "TWO", "THREE_STAR", "THREE_DELTA"],
], ],
"phase_voltages_b": [ "phase_voltages_b": [
"Phase voltages - B", "Phase voltages - B",
"mdi:flash", "mdi:flash",
VOLT, VOLT,
"phase_voltage_b", "phase_voltage_b",
["TWO", "THREE_STAR", "THREE_DELTA"],
None, None,
["TWO", "THREE_STAR", "THREE_DELTA"],
], ],
"phase_voltages_c": [ "phase_voltages_c": [
"Phase voltages - C", "Phase voltages - C",
"mdi:flash", "mdi:flash",
VOLT, VOLT,
"phase_voltage_c", "phase_voltage_c",
["THREE_STAR"],
None, None,
["THREE_STAR"],
], ],
"line_voltages_a": [ "line_voltages_a": [
"Line voltages - A", "Line voltages - A",
"mdi:flash", "mdi:flash",
VOLT, VOLT,
"line_voltage_a", "line_voltage_a",
["ONE", "TWO", "THREE_STAR", "THREE_DELTA"],
None, None,
["ONE", "TWO", "THREE_STAR", "THREE_DELTA"],
], ],
"line_voltages_b": [ "line_voltages_b": [
"Line voltages - B", "Line voltages - B",
"mdi:flash", "mdi:flash",
VOLT, VOLT,
"line_voltage_b", "line_voltage_b",
["TWO", "THREE_STAR", "THREE_DELTA"],
None, None,
["TWO", "THREE_STAR", "THREE_DELTA"],
], ],
"line_voltages_c": [ "line_voltages_c": [
"Line voltages - C", "Line voltages - C",
"mdi:flash", "mdi:flash",
VOLT, VOLT,
"line_voltage_c", "line_voltage_c",
["THREE_STAR", "THREE_DELTA"],
None, None,
["THREE_STAR", "THREE_DELTA"],
], ],
} }
@ -182,7 +182,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
# Add phase- and line voltages # Add phase- and line voltages
for sensor_name, sensor in VOLTAGE_SENSORS.items(): for sensor_name, sensor in VOLTAGE_SENSORS.items():
if service_location.phase_type in sensor[4]: if service_location.phase_type in sensor[5]:
entities.append( entities.append(
SmappeeSensor( SmappeeSensor(
smappee_base=smappee_base, smappee_base=smappee_base,