jekalmin / extended_openai_conversation

Home Assistant custom component of conversation agent. It uses OpenAI to control your devices.
834 stars 108 forks source link

Help building spotcast function #169

Closed Xornop closed 3 months ago

Xornop commented 3 months ago

when i add any

jekalmin commented 3 months ago

Thanks for reporting an issue. Could you share a full yaml of functions?

Xornop commented 3 months ago

Closed this issue. I found my indentation error.

sajov commented 2 months ago

@Xornop i also try to integrate a function for spotcast, Can you share details of yours?

Xornop commented 2 months ago
- spec:
    name: play_spotify
    description: Play Spotify on a device
  function:
    type: script
    sequence:
      - choose:
          - conditions:
              - condition: state
                entity_id: media_player.spotify_user1
                state: paused
            sequence:
              - service: spotcast.start
                data:
                  force_playback: true
                  random_song: true
                  repeat: context
                  shuffle: true
                  offset: 0
                  ignore_fully_played: false
                  account: user1
                  device_name: Chromecast
          - conditions:
              - condition: state
                entity_id: media_player.spotify_user1
                state: playing
            sequence:
              - service: media_player.media_pause
                target:
                  entity_id: media_player.spotify_user1
                data: {}

@sajov