home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.31k stars 30.62k forks source link

Missing energy sensors from myStrom integration since new UI-based configuration #96084

Closed bbmedia closed 1 year ago

bbmedia commented 1 year ago

The problem

I lost the main feature of my myStrom-Plugs because of the new non-yaml, UI-based configuration. I can't read out the energy and power values anymore. This makes the whole integration completely useless.

Is there a way I can still manually configure my myStrom plugs?

What version of Home Assistant Core has the issue?

2023.7

What was the last working version of Home Assistant Core?

2023.6

What type of installation are you running?

Home Assistant OS

Integration causing the issue

myStrom

Link to integration documentation on our website

https://www.home-assistant.io/integrations/mystrom/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @fabaff, mind taking a look at this issue as it has been labeled with an integration (mystrom) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `mystrom` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign mystrom` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


mystrom documentation mystrom source (message by IssueLinks)

joostlek commented 1 year ago

What device do you have?

bbmedia commented 1 year ago

A myStrom Wifi Switch (https://mystrom.ch/de/wifi-switch/).

joostlek commented 1 year ago

I am really curious how this comes, since I checked the code changes for mystrom since 2023.6 and 2023.7 and there was never any change in how the switches work. But you're not the first one who asks about this so I am a bit confused.

Anyway, I know that there was a PR in 2022 that removed support for this and there was a ticket created for this (https://github.com/home-assistant/core/issues/53319).

For now the quickest workaround would be to create a rest sensor that requests data from the device and turn that into a sensor. A little base can be found at https://github.com/home-assistant/core/issues/95929#issuecomment-1623064252

bbmedia commented 1 year ago

After updating to 2023.7 there was a "incompatibility notification" from the myStrom integration, that I have to delete my configuration.yaml myStrom config (where I had everything setup as REST-sensors with templates).

So, I did that (because the myStrom sensors were not working anymore) just to find out that I still see the myStrom switch entities but the sensors were gone.

joostlek commented 1 year ago

After updating to 2023.7 there was a "incompatibility notification" from the myStrom integration, that I have to delete my configuration.yaml myStrom config (where I had everything setup as REST-sensors with templates).

So, I did that (because the myStrom sensors were not working anymore) just to find out that I still see the myStrom switch entities but the sensors were gone.

Ooooooohh, that explains.

Right. That message was asking to remove the

sensor(/switch):
   - type: mystrom
      ....

part of the config. The REST integration is completely independent from the core integrations.

So to fix this you would have to get a backup from that config file and restore it

bbmedia commented 1 year ago

Yes, I've just realised the same... I removed too much ;-). Sorry for creating the issue. I guess I can fix that on my own.

joostlek commented 1 year ago

No problem :)