MyStrom v2 temperature not working

Hello,

I’m new on Home Assistant and my first challenge is to join my MyStrom v2 switch. I spent a lot of time but I can get the temperature value. As I’ve seen on github, change for v2 seems to be done. Somebody can check my config ?

# MyStrom Switch v2
switch:
  - platform: mystrom
    host: 192.168.178.49
    name: myswitch1

sensor:
  - platform: template
    sensors:
      power:
        friendly_name: "Current Power"
        unit_of_measurement: "W"
        value_template: "{{ state_attr('switch.mystrom1', 'current_power_w') }}"
      current_temperature:
        friendly_name: "Current Temperature"
        unit_of_measurement: "°C"
        value_template: "{{ state_attr('switch.mystrom1', 'temperature') }}"

On the Dev tool, I can see:

MyStrom v2 Firmware: 3.82.40
Home Assistant version: 0.113.3 (on Docker)

Thanks for your help

David

Your config is fine, but it looks like the switch isn’t reporting the temperature or at least its not included in the The code on github and the docs fon’t include anything related to temperature. Where did you read that temperature will be available?

Do you see the temperature in the app? If so, it should be easy to make a PR to add temperature as well.

Thanks for your reply ! Temperature is avilable on the mystrom app and you can get it on http://192.168.178.49/report the hardeware side is ok.

And I found this on GitHub side: https://github.com/home-assistant/core/pull/36580 and this https://github.com/home-assistant/core/pull/36965

May I do another change or config ?

The PR has never been merged, it has been matked as stale 2 days ago, so you can either leave a comment and reopen the issue or depending on your system try doing the changes from the PR in your own system and see if that works.

Oh ok I’ve haven’t seen that the changes are not merged… I tried to do it manually but it not working. I will wait until it’s merged and completely applied.

Thanks for your help !

Best regards

That’s not going to happen unless you ask for the pull request to be re-opened.

It looks like both pull requests got dropped. If you want temperature from the myStrom switch, you need to use the REST API. Here’s what I used (use your own IP address & name):

sensor:
  - platform: rest
    name: "mystrom_temp1"
    resource: http://192.168.178.199/report
    method: GET
    unit_of_measurement: "°C"
    device_class: temperature
    state_class: measurement
    value_template: "{{ value_json.temperature | round(1) }}"
1 Like