# update_govee_scenes.py
input_select_entity = "input_select.ceiling_light_scenes"

# Die Antwort aus deinem API-Aufruf (Beispiel)
response = hass.states.get("sensor.govee_api_response").attributes.get("payload", {})

# Extrahiere die Optionsnamen
options = [scene["name"] for scene in response.get("capabilities", [])[0]["parameters"]["options"]]

# Aktualisiere die input_select mit neuen Optionen
if options:
    service_data = {"entity_id": input_select_entity, "options": options}
    hass.services.call("input_select", "set_options", service_data)
