question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sonoff POW history usage errors in log

See original GitHub issue

I noticed I have few thousands lines of errors in .log file. All of them look like this: https://pastebin.com/QZ6wqqhc

Here is fragment from configuration:

sensor:
- platform: template
  sensors:
    power_ups:
      friendly_name: UPS
      unit_of_measurement: W
      device_class: power
      value_template: "{{ state_attr('switch.sonoff_1000bda5e7', 'power') }}"    
    history1_ups:
      friendly_name: UPS today
      unit_of_measurement: kWh
      device_class: power
      value_template: "{{ state_attr('switch.sonoff_1000bda5e7', 'consumption')[0] | round(2) }}"
    history30_ups:
      friendly_name: UPS last 30 days
      unit_of_measurement: kWh
      device_class: power
      value_template: "{{ state_attr('switch.sonoff_1000bda5e7', 'consumption')[:30]|sum | round(2) }}" 

What may be wrong there? It was working without issues some versions earlier.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
AlexxITcommented, Sep 22, 2020
value_template: "{% set p=state_attr('switch.sonoff_1000abcdef', 'consumption') %}{{ p[:10]|sum|round(2) if p }}"
0reactions
gucioplcommented, Sep 22, 2020

pow Errors are indeed gone, but multiple digit extensions are back on few devices in 30days history.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Consumption history data SonoffLAN · Issue #823 - GitHub
Hi. Until recently I have always been able to extract historic consumption data in kWh from practiacally any SONOFF device with power monitoring...
Read more >
eWeLink & Sonoff User Group | Does anyone have problems ...
Does anyone have problems with Sonoff pow R2 after updating 3.3.0. Monitoring is very slow or not at all. OPS does not work!!!!....
Read more >
#99 Measuring Power, hacked Sonoff POW, MQTT, Adafruit.io ...
The Sonoff POW is a very interesting device for Home Automation. It costs only 10$ and can measure power, transmit it to your...
Read more >
Elite measurements! Sonoff POW Elite - NotEnoughTech
No matter how nice you ask, Alexa won't tell you the usage data coming from the device. I may follow this article with...
Read more >
SONOFF Official Homepage| Smart Home automation ...
Explore the innovative world of SONOFF, learn and chose about various smart home products, define your smart home,your smart choice!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found