If that still causes it to report: ‘Entity is non-numeric sensor.bytes_sent’ then there’s something else wrong, beyond what is visible to me given the information you’ve provided.
Out of curiosity, paste this into the Template Editor and tell me what it reports (or show me a screenshot of the result):
{{ (states('sensor.arris_tg2492lg_85_router_kbyte_sec_sent') | int / 1024) | round(1) }}
just got back to sorting this out and your ‘code’ worked perfectly. the problem was me, I made a typo somehow and on top of that when i was testing it i somehow managed to select the wrong sensor… I changed the round(1) to round(3) and everything is working perfectly now… thank you!!
again the problem was human error on my part… Sorry
I’m no expert (still a novice in fact.) But your sensors don’t match here… in your top entity_id you have sensor.rt_ax58u_29d0_b_recieved but in the template you have sensor.rt_ax58u_29d0_b_sent as far as I can see your top one should be sensor.bytes_sent as that’s your new converted sensor
Images of text are not usually much use as it is not possible to copy and paste corrections. Exceptions being: where demonstrating something in the UI, template editor results, or where line numbers are needed.
Is my understanding correct that with this template it should create a new sensor called sensor.bytes_sent which will use the data from sensor.rt_ax58u_29d_b_sent but in a different format as defined by the template?
Also, never reboot. Restarting the HA application is sufficient. In fact there is a Reload template Entities service you can use instead of restarting, but make sure it passes the config check first.
I didn’t check the config before restarting but normally if there are any errors these appear in the Log which shows no issues. Doing a config check now and it says “Configuration valid!”. So not sure why this wouldn’t be working.
What’s the Reload template for entities as this would be useful.
@tom_l thank you do much for your help its much appreciated. This has now worked. I am now seeing MB rather than B. On to the next issue. Looking at this more it appears to be a running total rather than a daily total. Need to look how I can get daily totals
Wow that looks a whole lot simpler than the code I have found here:
Update
I have tested Utility Meter and asked it to reset hourly ( to see if it works) but as you can see nothing has reset to 0 so doesn’t look to work. But then I am not 100% sure how correct these figures are given my total download has not moved for a long time though states it was updated 4 minutes ago.
Thank you so much for tagging me in this! I was just logging into the forum to try to grab my old solution after a data loss of my past HA instance, and this may make things way easier if it works.