Skip to content

Commit

Permalink
adding the XTOPs from JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorYbema committed Aug 26, 2024
1 parent 90f1783 commit d82c4be
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions HeishaMon/htmlcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,20 @@ static const char refreshJS[] PROGMEM =
" tableBody.appendChild(row);"
" });"
" }"
" if (jsonData?.['heatpump extra'] && Array.isArray(jsonData['heatpump extra])) {"
" const tableBody = document.getElementById('heishavalues');"
" jsonData['heatpump extra].forEach(item => {"
" const row = document.createElement('tr');"
" for (const key in item) {"
" if (Object.hasOwn(item,key)) {"
" const cell = document.createElement('td');"
" cell.textContent = item[key];"
" row.appendChild(cell);"
" }"
" }"
" tableBody.appendChild(row);"
" });"
" }"
" if (jsonData?.['1wire'] && Array.isArray(jsonData['1wire'])) {"
" const tableBody = document.getElementById('dallasvalues');"
" tableBody.innerHTML = '';"
Expand Down

0 comments on commit d82c4be

Please sign in to comment.