How do I toggle an existing HA switch from ESPHome?

I have an existing binary “home/away” switch called switch.wiser_away_mode in Home Assistant linked to a Drayton Wiser thermostat via the HACS integration. How do I toggle that switch from within ESPHome please? I am using the homeassisant ESPHome API.

I could create an ESPHome template switch and then a Home Assistant automation but would prefer to directly toggle the HA switch from within an on-value section in ESPHome.

thanks :slight_smile:

    [update thermostat in Home Assistant to be "Away"]

Answered my own question!

            - homeassistant.service:
                  service: homeassistant.turn_on
                    entity_id: switch.wiser_away_mode