add value list support

This commit is contained in:
John
2023-06-03 10:45:08 +02:00
parent 5825975d48
commit 699f056381
4 changed files with 63 additions and 1 deletions
+20 -1
View File
@@ -200,12 +200,13 @@ type_switch-number =
type_switch-w-list =
switch,, = onoff
switch,,,yesno = yesno
select,, =
# HA integration: the mapping list for rather binary sensor entities by field type, name, message, and unit.
type_switch-list =
binary_sensor,,measurement = onoff
binary_sensor,,measurement,yesno = yesno
sensor,, =
sensor,,,list =
# HA integration: currently unused mapping lists for non-numeric/non-binary entities.
#type_switch-string =
@@ -278,6 +279,24 @@ type_part-binary_sensoryesno = ,
"payload_on":"yes",
"payload_off":"no"%state_class
# optional format string for converting a fields value list into %field_values.
# "$value" and "$text" are being replaced by the corresponding part.
field_values-entry = "$text"
# optional separator for concatenating of field value list items.
field_values-separator = ,
# optional prefix for surrounding field value list items.
field_values-prefix = [
# optional suffix for surrounding field value list items.
field_values-suffix = ]
# HA integration: %type_part variable for select %type_topic and sensor with list of known values
type_part-select = ,
"command_topic":"%topic/set",
"options":%field_values
type_part-sensorlist = ,
"device_class":"enum",
"options":%field_values
# the field specific part (evaluated after the message specific part).
# HA integration: set to the mapped %type_part from above
field_payload = %type_part
+11
View File
@@ -149,6 +149,17 @@ type_map-datetime = string
#type_part-number = ,
# optional format string for converting a fields value list into %field_values.
# "$value" and "$text" are being replaced by the corresponding part.
#field_values-entry = $text
# optional separator for concatenating of field value list items.
#field_values-separator = ,
# optional prefix for surrounding field value list items.
#field_values-prefix =
# optional suffix for surrounding field value list items.
#field_values-suffix =
# the field specific part (evaluated after the message specific part).
#field_payload = %type_part