Service as a switch

Hi there,

I would like to be able to turn on the air conditioning in my car as a switch in the Lovelace.
To do this, I would have to run the following service:

bmw_connected_drive.activate_air_conditioning

How do I get a service integrated as a switch.

Greetings Werner

Hi there,

I managed it myself with a map.
Now I would like to use this service in my HUE emulation via Alexa.
Currently my code for the HUE emulation looks like this:

emulated_hue:
  host_ip: 192.168.173.71
  listen_port: 80
  expose_by_default: false
  entities:
    light.iluminize_hk_zd_rgbcct_a_level_light_color_on_off:
      name: "Esstisch"
      hidden: false
    script.kueche_jalousie_leichter_blenschutz:
      name: "Leichter Sonnenschutz"
      hidden: false
    script.kueche_jalousie_voller_blenschutz:
      name: "Voller Sonnenschutz"
      hidden: false
    switch.luefterszkg_timer:
      name: "Lüfter"
      hidden: false

How can I do a service there (``
bmw_connected_drive.activate_air_conditioning
integrate?

Greetings Werner

You can create your own switch like this: Template Switch - Home Assistant

Hello and thanks for the answer.

Unfortunately I don’t understand the instructions.
I was able to integrate the air conditioning into the Lovelace.
Only not in the HUE emulation.
Would it be so correct :?

emulated_hue:
  host_ip: 192.168.173.71
  listen_port: 80
  expose_by_default: false
  entities:
    service.bmw_connected_drive.activate_air_conditioning:
      name: "BMW Klima an"
      hidden: false

I beginner.
Thanks for your patience.

Greetings Werner