teecis
(Teecis)
1
I found similar question here, but those answers did not help me. I have XML that has 3 sensors which have identical tags.
XML:
<HEATAREA nr="1">
<T_ACTUAL>23.2</T_ACTUAL>
<T_ACTUAL_EXT>23.2</T_ACTUAL_EXT>
<T_TARGET>23.0</T_TARGET>
</HEATAREA>
<HEATAREA nr="3">
<T_ACTUAL>23.5</T_ACTUAL>
<T_ACTUAL_EXT>23.5</T_ACTUAL_EXT>
<T_TARGET>22.0</T_TARGET>
</HEATAREA>
I need to read <T_ACTUAL>23.2</T_ACTUAL>
of each <HEATAREA nr="X">
I tried
But it does not work.
Please help
finity
2
try using a value_template:
value_template: "{{ value | regex_findall_index('T_ACTUAL>(\d+)</T_ACTUAL') }}"
I think that should work.
Hi, Did you get it to work?
I tried using the value template above but it I cant seem to get any contents / values in the variable.
- platform: scrape
resource: http://192.168.1.199/status.xml
name: room1
select: “temp”
value_template: '{{ value | regex_findall_index("temp>(\d+)</temp") }}'
http://192.168.1.199/status.xml
<response>
<sensor>
<id>282D6FB14D20013C</id>
<temp>19.31</temp>
</sensor>
<sensor>
<id>282D6FB14D20013D</id>
<temp>19.55</temp>
</sensor>
<sensor>
<id>282D6FB14D20013E</id>
<temp>19.22</temp>
</sensor>
<sensor>
<id>282D6FB14D20013F</id>
<temp>19.66</temp>
</sensor>
<version>
<model>KMtronic DS1820 Temperature Adapter PRO32</model>
<ver>2.0</ver>
</version>
</response>
teecis
(Teecis)
4
Yes, sorry, for everyone finding this topic, please look here. There are two modules for this system in Home Assistant: