docs: def write_ha_config(ip, mac, hass, port, id):
      """Write the configuration for Home Assistant to a myStrom button."""
      click.echo("Write configuration for Home Assistant to device %s..." % ip)
  
      action = "get://{1}:{2}/api/mystrom?{0}={3}"
      data = {
          'single': action.format('single', hass, port, id),
          'double':  action.format('double', hass, port, id),
          'long':  action.format('long', hass, port, id),
          'touch':  action.format('touch', hass, port, id),
      }
      request = requests.post(
          'http://{}/{}/{}/'.format(ip, URI, mac), data=data, timeout=TIMEOUT)
  
      if request.status_code == 200:
          click.echo("Configuration for %s set" % ip)
          click.echo("After using the push pattern the first time then "
                     "the myStrom WiFi Button will show up as %s" % id)