State object:
Template editor:
<template state sensor.miners=3,51 kH/s; custom_ui_state_card=state-card-crypto_profit, friendly_name=Miners, groupList=[{'id': 0, 'name': 'My Miners', 'minerList': [{'asicList': [], 'hasPool': True, 'poolList': [{'id': 0, 'minerName': 'm06', 'canRemove': False, 'canEnable': True, 'priorityInfo': {'quota': 0, 'priority': 0}, 'name': '', 'progressInfo': {'line2': '2', 'line1': '85', 'line3': '0'}, 'canPrioritize': True, 'coinName': 'Unspecified Equihash', 'canDisable': True, 'additionalInfo': {'displayUrl': 'x', 'worker': 'totaloutline.m01'}, 'statusInfo': {'statusLine3': None, 'statusDisplay': 'Enabled'}, 'minerID': 2}], 'canStart': False, 'speedInfo': {'hashrate': '3,51 kH/s', 'line2': 'Avg: 3,51 kH/s', 'hashrateValue': 3507, 'logInterval': 5, 'avgHashrate': '3,51 kH/s', 'workUtility': '0,00', 'line3': None}, 'hasAsic': False, 'pgaList': [], 'gpuList': [{'deviceInfo': {'gpuVoltage': '0,00', 'gpuClock': 1696, 'name': None, 'deviceType': 'GPU', 'gpuActivity': 9, 'intensity': None, 'gpuMemoryClock': 4404, 'fanSpeed': 1255, 'temperature': 55, 'gpuPowertune': 0, 'fanPercent': 34}, 'name': 'GPU 0', 'progressInfo': {'line2': '0', 'line1': '12', 'line3': '0'}, 'statusInfo': {'statusLine3': 'Load: 9%<br/>', 'statusDisplay': 'Enabled'}, 'speedInfo': {'hashrate': '442,00 H/s', 'line2': None, 'hashrateValue': 0, 'logInterval': 5, 'avgHashrate': '444,00 H/s', 'workUtility': '0,00', 'line3': None}}, {'deviceInfo': {'gpuVoltage': '0,00', 'gpuClock': 1658, 'name': None, 'deviceType': 'GPU', 'gpuActivity': 9, 'intensity': None, 'gpuMemoryClock': 4404, 'fanSpeed': 1177, 'temperature': 54, 'gpuPowertune': 0, 'fanPercent': 32}, 'name': 'GPU 1', 'progressInfo': {'line2': '0', 'line1': '9', 'line3': '0'}, 'statusInfo': {'statusLine3': 'Load: 9%<br/>', 'statusDisplay': 'Enabled'}, 'speedInfo': {'hashrate': '443,00 H/s', 'line2': None, 'hashrateValue': 0, 'logInterval': 5, 'avgHashrate': '442,00 H/s', 'workUtility': '0,00', 'line3': None}}, {'deviceInfo': {'gpuVoltage': '0,00', 'gpuClock': 1671, 'name': None, 'deviceType': 'GPU', 'gpuActivity': 9, 'intensity': None, 'gpuMemoryClock': 4404, 'fanSpeed': 1266, 'temperature': 56, 'gpuPowertune': 0, 'fanPercent': 35}, 'name': 'GPU 2', 'progressInfo': {'line2': '0', 'line1': '17', 'line3': '0'}, 'statusInfo': {'statusLine3': 'Load: 9%<br/>', 'statusDisplay': 'Enabled'}, 'speedInfo': {'hashrate': '438,00 H/s', 'line2': None, 'hashrateValue': 0, 'logInterval': 5, 'avgHashrate': '440,00 H/s', 'workUtility': '0,00', 'line3': None}}, {'deviceInfo': {'gpuVoltage': '0,00', 'gpuClock': 1683, 'name': None, 'deviceType': 'GPU', 'gpuActivity': 9, 'intensity': None, 'gpuMemoryClock': 4404, 'fanSpeed': 915, 'temperature': 54, 'gpuPowertune': 0, 'fanPercent': 25}, 'name': 'GPU 3', 'progressInfo': {'line2': '1', 'line1': '10', 'line3': '0'}, 'statusInfo': {'statusLine3': 'Load: 9%<br/>', 'statusDisplay': 'Enabled'}, 'speedInfo': {'hashrate': '439,00 H/s', 'line2': None, 'hashrateValue': 0, 'logInterval': 5, 'avgHashrate': '439,00 H/s', 'workUtility': '0,00', 'line3': None}}, {'deviceInfo': {'gpuVoltage': '0,00', 'gpuClock': 1607, 'name': None, 'deviceType': 'GPU', 'gpuActivity': 9, 'intensity': None, 'gpuMemoryClock': 4404, 'fanSpeed': 1258, 'temperature': 56, 'gpuPowertune': 0, 'fanPercent': 34}, 'name': 'GPU 4', 'progressInfo': {'line2': '1', 'line1': '9', 'line3': '0'}, 'statusInfo': {'statusLine3': 'Load: 9%<br/>', 'statusDisplay': 'Enabled'}, 'speedInfo': {'hashrate': '426,00 H/s', 'line2': None, 'hashrateValue': 0, 'logInterval': 5, 'avgHashrate': '425,00 H/s', 'workUtility': '0,00', 'line3': None}}, {'deviceInfo': {'gpuVoltage': '0,00', 'gpuClock': 1620, 'name': None, 'deviceType': 'GPU', 'gpuActivity': 9, 'intensity': None, 'gpuMemoryClock': 4404, 'fanSpeed': 1303, 'temperature': 56, 'gpuPowertune': 0, 'fanPercent': 36}, 'name': 'GPU 5', 'progressInfo': {'line2': '0', 'line1': '9', 'line3': '0'}, 'statusInfo': {'statusLine3': 'Load: 9%<br/>', 'statusDisplay': 'Enabled'}, 'speedInfo': {'hashrate': '440,00 H/s', 'line2': None, 'hashrateValue': 0, 'logInterval': 5, 'avgHashrate': '435,00 H/s', 'workUtility': '0,00', 'line3': None}}, {'deviceInfo': {'gpuVoltage': '0,00', 'gpuClock': 1671, 'name': None, 'deviceType': 'GPU', 'gpuActivity': 9, 'intensity': None, 'gpuMemoryClock': 4404, 'fanSpeed': 1162, 'temperature': 55, 'gpuPowertune': 0, 'fanPercent': 32}, 'name': 'GPU 6', 'progressInfo': {'line2': '0', 'line1': '12', 'line3': '0'}, 'statusInfo': {'statusLine3': 'Load: 9%<br/>', 'statusDisplay': 'Enabled'}, 'speedInfo': {'hashrate': '437,00 H/s', 'line2': None, 'hashrateValue': 0, 'logInterval': 5, 'avgHashrate': '442,00 H/s', 'workUtility': '0,00', 'line3': None}}, {'deviceInfo': {'gpuVoltage': '0,00', 'gpuClock': 1633, 'name': None, 'deviceType': 'GPU', 'gpuActivity': 9, 'intensity': None, 'gpuMemoryClock': 4404, 'fanSpeed': 1415, 'temperature': 59, 'gpuPowertune': 0, 'fanPercent': 39}, 'name': 'GPU 7', 'progressInfo': {'line2': '0', 'line1': '7', 'line3': '0'}, 'statusInfo': {'statusLine3': 'Load: 9%<br/>', 'statusDisplay': 'Enabled'}, 'speedInfo': {'hashrate': '442,00 H/s', 'line2': None, 'hashrateValue': 0, 'logInterval': 5, 'avgHashrate': '438,00 H/s', 'workUtility': '0,00', 'line3': None}}], 'hostname': 'localhost', 'updatedUtc': '2018-03-04T18:26:25.4773545Z', 'hardware': None, 'progressInfo': {'line2': 'Rejected: 2', 'line1': 'Accepted: 85', 'line3': 'HW Errors: 0'}, 'updated': '2018-03-04 19:26:25', 'coinInfo': {'profitPerMonth': None, 'profitPerDay': None, 'displayName': '', 'revenuePerDay': '$18,05', 'profitPerDayValue': 0.0, 'revenuePerMonth': '$547,01', 'revenuePerDayValue': 18.05322865912904}, 'canPool': False, 'hasPga': False, 'id': 2, 'canStop': True, 'canRestart': True, 'canReboot': True, 'groupId': 0, 'hasGpu': True, 'name': 'm06', 'temperature': '59 °C', 'pool': '', 'statusInfo': {'statusLine3': '1d 22h 15m ', 'statusDisplay': 'Mining'}, 'hasValidStatus': True}]}] @ 2018-03-04T19:25:44.352045+01:00>
The info after groupList is the same as in my custom state card when I write:
<template>
<p>[[_toStr(stateObj.attributes.groupList)]]</p>
</template>
I’m considering if I can just extract the groupList[0].minerList[0] object as a value_template, since that’s what I need to use, and I wouldn’t need to extract the [0] from inside the state card.
Thanks for looking into it!