From f0d737d22e5acc809c9917a20369631be3d28156 Mon Sep 17 00:00:00 2001 From: John Date: Sat, 7 Oct 2023 18:58:04 +0200 Subject: [PATCH] add time fields from timer messages (closes #1006) --- contrib/etc/ebusd/mqtt-hassio.cfg | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/contrib/etc/ebusd/mqtt-hassio.cfg b/contrib/etc/ebusd/mqtt-hassio.cfg index 83d53dc1..98f1e4ba 100644 --- a/contrib/etc/ebusd/mqtt-hassio.cfg +++ b/contrib/etc/ebusd/mqtt-hassio.cfg @@ -105,7 +105,7 @@ filter-seen = 5 #filter-non-circuit = # include only messages having the specified name (partial match, alternatives and wildcard supported). # HA integration: filter to some useful names for monitoring the heating circuit -filter-name = status|temp|yield|count|energy|power|runtime|hours|starts|mode|curve|^load$|^party$|sensor +filter-name = status|temp|yield|count|energy|power|runtime|hours|starts|mode|curve|^load$|^party$|sensor|timer # exclude messages having the specified name (partial match, alternatives and wildcard supported). #filter-non-name = # include only messages having the specified level (partial match, alternatives and wildcard supported). @@ -146,10 +146,10 @@ circuit_part = { # This is also an implicit field type filter as missing or empty mappings are not published at all. type_map-number = number type_map-list = string -# HA integration: skip string/date/time types completely +type_map-time = time +# HA integration: skip string/date/datetime types completely type_map-string = type_map-date = -type_map-time = type_map-datetime = # field type switch designator, see below. @@ -210,13 +210,16 @@ type_switch-list = binary_sensor,,measurement,yesno = yesno sensor,,,list = +# HA integration: the mapping list for (potentially) writable string entities containing a time value by field type, name, message, and unit. +type_switch-w-time = + text,,,time = from,|to,|time2,|timer + text,,,time3 = time, + # HA integration: currently unused mapping lists for non-numeric/non-binary entities. #type_switch-string = # sensor,, = #type_switch-date = # sensor,,measurement = -#type_switch-time = -# sensor,,measurement = #type_switch-datetime = # sensor, = @@ -281,6 +284,14 @@ type_part-binary_sensoryesno = , "payload_on":"yes", "payload_off":"no"%state_class +# HA integration: %type_part variable for text %type_topic +type_part-texttime = , + "command_topic":"%topic/set", + "pattern": "^[012][0-9]:[0-5][0-9]$"%state_class +type_part-texttime3 = , + "command_topic":"%topic/set", + "pattern": "^[012][0-9]:[0-5][0-9]:[0-5][0-9]$"%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"