StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
621 stars 111 forks source link

[BUG] Shelly EM current consumption Unknown #444

Closed jotacor closed 2 years ago

jotacor commented 4 years ago

Environment

Describe the bug

The current consumption of all the Shelly EM are in unknown state.

Steps to Reproduce

Install ShellyForHASS 0.2.0 and wait.

Expected behavior

Get the current consumption.

Screenshots

Traceback/Error logs

Additional context

callap commented 4 years ago

same here 👋 downgrading to 0.1.9 through reinstall didn't helped.

rprb93 commented 4 years ago

Same Here!!! I don't have current consumption of all the Shelly EM

samvanh commented 4 years ago

Edit: seems to be duplicate of https://github.com/StyraHem/ShellyForHASS/issues/430

Same here

Screenshot 2020-09-17 at 08 51 23
Senbei123 commented 3 years ago

On my integration it only shows shortly the current consumption when I refresh the shelly in the official shelly app. After 1-2 seconds it goes back to 0 W.

halecivo commented 3 years ago

same here 😢

thecem commented 3 years ago

Change to latest beta works. Go to hacs -> shellyforhass -> reinstall (three dots) -> switch to beta channel -> install latest beta...

halecivo commented 3 years ago

For me even 0.2.1 beta1 does not work.

ccpk1 commented 3 years ago

I updated the firmware of my two Shelly EM devices to Shelly 1.8, then updated shellyforhass to the 0.2.1 beta 1 as mentioned above. After restarting everything, current_consumption is now working, BUT voltage for both devices still shows as unavailable.

hakana commented 3 years ago

Do you have enabled the voltage sensor?

For me, it working when testing.

hakana commented 3 years ago

I think I found the problem, in the latest version there are 2 voltage sensors for each channel. I have fixed this now so it only show one voltage sensor with the right entity id.

ccpk1 commented 3 years ago

Thank you for looking into this. I am using the voltage sensor as you asked in your initial response. At this time, the state of that sensor shows as "Unavailable."

In the interim, I noticed that voltage is already available as a property of the _current_consumption sensor, so I just changed my existing templates to pull voltage from there . Example: state_attr('sensor.shelly_shem_xxxxxx_1_current_consumption', 'voltage')

The workaround I mention above is fine for me, but I'll happily test out your update and confirm when you make it available.

DeviousPenguin commented 3 years ago

Hi, I think I'm getting this bug, I'm running latest shelly firmware 1.9.0 and latest shelly4hass, 0.2.1

I used to get voltage information in an older shelly firmware, I think it was 1.8.x

I was also using an earlier version of the shelly4hass at the time, the think it was 0.2.0

Since updating firmware and shelly4hass I now have no voltage sensors for the Shelly EM, only current usage and total current.

I'm using the config.yaml method to store data, is it worth switching to the database method at all?