myStrom power consumption sensor graph stays on last value

Good morning (o;

I have added a power sensor based on another thread here:

sensor:
  - platform: template
    sensors:
      hp6632b2:
        friendly_name: "Current Power"
        unit_of_measurement: "W"
        value_template: "{{ states.switch.hp_6632b_21.attributes['current_power_w'] }}"

When I add a new sensor in lovelace and switch on the WLAN switch the power consumption is displayed and logged correctly…

But as soon I switch off the WLAN switch, the power is displayed correctly as 0, but the graph stays at the last level…sometimes it is displayed correct when doing several web page reloads…

mystrom_power1

I saw on github that I have to modify the mystrom.py file, but this file is nowhere to be found in my installation…

Any hints

To modify the .py files, you have to make it a custom component rather than dig around in the system files.

  1. Go to the integrations page
  2. Click on “View on Github” on the right
  3. Copy the URL
  4. Paste the URL into downgit.github.io, hit “Download”
  5. Go to your Home Assistant config folder, create a new directory called custom_components.
  6. Inside of the .zip you’ve downloaded there’s a folder named like the integration, unpack this folder into the custom_components directory.

You can now edit all python code in the custom_components/myintegration folder.
Usually each change requires a restart.