myStrom Switch

The mystrom switch platform allows you to control the state of your myStrom switches. The built-in sensor is measuring the power consumption while the switch is on.


Make sure that you have enabled the REST API under Advanced in the web frontend of the switch.


To use your myStrom switch in your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
  - platform: mystrom
    host: IP_ADRRESS

Configuration Variables


(string)(Required)The IP address of your myStrom switch, e.g.,


(string)(Optional)The name to use when displaying this switch.

Default value: myStrom Switch

Check if you are able to access the device located at http://IP_ADRRESS. The details about your switch is provided as a JSON response.

$ curl -X GET -H "Content-Type: application/json" http://IP_ADDRESS/report
	"power":	0,
	"relay":	false

or change its state:

$ curl -G -X GET http://IP_ADDRESS/relay -d 'state=1'

Get the current power consumption

The switch is measuring the current power consumption. To expose this as a sensor use a template sensor.

# Example configuration.yaml entry
  - platform: template
        friendly_name: "Current Power"
        unit_of_measurement: "W"
        value_template: "{{ }}"