make min+max+step optional

This commit is contained in:
John
2022-12-11 12:49:13 +01:00
parent d299962566
commit deadd51bff
+13 -4
View File
@@ -229,6 +229,18 @@ state_class ?= ,
unit_of_measurement ?= ,
"unit_of_measurement":"%unit"
# HA integration: optional variable with the minimum numeric value
min_number ?= ,
"min":%min
# HA integration: optional variable with the maximum numeric value
max_number ?= ,
"max":%max
# HA integration: optional variable with the numeric step value
step_number ?= ,
"step":%step
# field type part suffix to use instead of the field type itself, see below.
# HA integration: %type_part variable mapped from the mapped %type_topic
type_part-by = %type_topic
@@ -237,10 +249,7 @@ type_part-by = %type_topic
# %type_part).
# HA integration: %type_part variable for number %type_topic
type_part-number = ,
"command_topic":"%topic/set",
"min":%min,
"max":%max,
"step":%step%unit_of_measurement%state_class%type_class_number
"command_topic":"%topic/set"%min_number%max_number%step_number%unit_of_measurement%state_class%type_class_number
# HA integration: %type_part variable for sensor %type_topic
type_part-sensor = %unit_of_measurement%state_class%type_class_sensor