i actually try to start with textual thing configuration. until now i always used textbased config files for things and items.
if i understand correct for the textual thing configuration i keep my *.things files and create in habapp a thing_???.yml file in the config folder.
so for example one thing i want habapp to create the item is
bus_thermo_zone EK_Fbh_Bad_Sensor "EK_Fbh_Bad_Sensor" @ "Temperatur" [ where="3", standAlone=false ]
till now my manually created *.items file is
Number:Temperature iEK_Fbh_Bad_Sensor "Bad Ist-Temperatur[%.1f %unit%]" <temperature> (iG_EK_Heizung) { unit="°C", channel="openwebnet:bus_thermo_zone:bticino:EK_Fbh_Bad_Sensor:temperature" }
the textual thing yml i created now like this:
test: True
filter:
thing_type: openwebnet:bus_thermo_zone
thing_label: 'EK_.+'
channels:
- filter:
channel_type: openwebnet:temperature
link items:
- type: Number
name: '{thing_label}'
label: '{thing_label, _.*?, } Ist-Temperatur[%.1f %unit%]'
icon: temperature
metadata:
unit: '°C'
groups: ['iG_EK_Heizung']
and if i save then habapp creates this *.items file in the config folder:
Number EK_Fbh_Bad_Sensor "EKFbhBadSensor Ist-Temperatur[%.1f %unit%]" <temperature> (iG_EK_Heizung) {channel = "openwebnet:bus_thermo_zone:bticino:EK_Fbh_Bad_Sensor:temperature", unit="°C"}
i see that the instead of Number:Temperature
there is only Number
now, if i try to add the :Temperature
to the type i recieve an error.
and i added a regex in the label, i wanted to substitute all _
with a space, but dont know how to do that (eg tried to add " " after the second comma but this does not work). final goal would be to change from this
EK_Fbh_Bad_Sensor
to this result
Bad Sensor
any help is higly appreciated, thanks