home-assistant-ecosystem / python-mystrom

Asynchronous Python API client for interacting with myStrom devices (plug, bulb, and button).
MIT License
15 stars 13 forks source link

Allow the setting of the API password #7

Open fabaff opened 6 years ago

fabaff commented 6 years ago

The CLI mystrom doesn't allow to include additional parameters for the URL. This is necessary if one wants to integrate the buttons in Home Assistant while api_password is set.

https://next.home-assistant.io/components/binary_sensor.mystrom/#setup-of-mystrom-buttons

Apsysikal commented 9 months ago

How do you provide authentication for Home Assistant to be called via the action from the button. I'm working on the myStrom PIR and am not able to get it to send authenticated requests. Home Assistant blocks them, because they're unauthorized. According to the docs a 'Authorization: Bearer Token' header should be sent with any request but according to myStrom this is not currently supported.

fabaff commented 9 months ago

How do you provide authentication for Home Assistant to be called via the action from the button.

The buttons can't be used with Home Assistant anymore. The work-around was https://github.com/home-assistant-ecosystem/mystrom2mqtt and https://github.com/home-assistant-ecosystem/mystrom2mqtt. But I haven't used them in a while and they are unmaintained currently.

The PIR uses the same approach as the buttons, thus it could be possible to integrate those devices with mystrom2mqtt.