<commit_before>################################################################
## Packages / Kodi Control
################################################################

homeassistant:
  customize:
    script.auto_cartoons:
      friendly_name: Cartoons
      icon: mdi:playlist-play

    script.auto_all_tv:
      friendly_name: All TV
      icon: mdi:playlist-play

    script.auto_pawpatrol:
      friendly_name: <NAME>
      icon: mdi:playlist-play

script:
  ################################################
  ## Living Room Cartoons
  ################################################

  auto_cartoons:
    sequence:
      - service_template: >-
          script.kodi_play_file{{ '_bootup' if is_state('switch.living_room_pc', 'off') }}
        data:
          file: "c:/Users/Living Room/AppData/Roaming/Kodi/userdata/playlists/video/cartoon2.xsp"

  ################################################
  ## Living Room - All TV
  ################################################

  auto_all_tv:
    sequence:
      - service_template: >-
          script.kodi_play_file{{ '_bootup' if is_state('switch.living_room_pc', 'off') }}
        data:
          file: "c:/Users/Living Room/AppData/Roaming/Kodi/userdata/playlists/video/all.xsp"

  ################################################
  ## Living Room - Paw Patrol
  ################################################

  auto_pawpatrol:
    sequence:
      - service_template: >-
          script.kodi_play_file{{ '_bootup' if is_state('switch.living_room_pc', 'off') }}
        data:
          file: "c:/Users/Living Room/AppData/Roaming/Kodi/userdata/playlists/video/pawpatrol.xsp"

  ################################################
  ## Kodi Commands
  ################################################

  kodi_defaults:
    sequence:
      - service: shell_command.curl
        data: &defaults
          url: "http://192.168.1.76:8099/jsonrpc"
          method: "post"
          headers:
            content-type: "application/json"

  kodi_play_file:
    sequence:
      - service: shell_command.curl
        data_template:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.Open"
            params:
              item:
                file: "{{ file }}"

  kodi_play_file_bootup:
    sequence:
      - service: switch.turn_on
        entity_id: switch.living_room_pc
      - delay: '00:01:30'
      - service: script.kodi_play_file
        data_template:
          file: "{{ file }}"

  kodi_playpause:
    sequence:
      - service: shell_command.curl
        data_template:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.PlayPause"
            params:
              playerid: 1
              play: "{{ play|default('toggle') }}"

  kodi_play:
    sequence:
      - service: script.kodi_playpause
        data:
          play: true

  kodi_pause:
    sequence:
      - service: script.kodi_playpause
        data:
          play: false

  kodi_stop:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.Stop"
            params:
              playerid: 1

  kodi_goto:
    sequence:
      - service: shell_command.curl
        data_template:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.GoTo"
            params:
              playerid: 1
              to: "{{ to }}"
  kodi_next:
    sequence:
      - service: script.kodi_goto
        data:
          to: "next"

  kodi_previous:
    sequence:
      - service: script.kodi_goto
        data:
          to: "previous"

  kodi_setspeed:
    sequence:
      - service: shell_command.curl
        data_template:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.SetSpeed"
            params:
              playerid: 1
              speed: "{{ speed|int(1) }}"

  kodi_seek:
    sequence:
      - service: shell_command.curl
        data_template:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.Seek"
            params:
              playerid: 1
              value: "{{ value|default('smallforward') }}"

  kodi_seek_forward:
    sequence:
      - service: script.kodi_seek
        data:
          value: "smallforward"

  kodi_seek_backward:
    sequence:
      - service: script.kodi_seek
        data:
          value: "smallbackward"

  kodi_set_repeat:
    sequence:
      - service: shell_command.curl
        data_template:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.SetRepeat"
            params:
              playerid: 1
              repeat: "{{ repeat|default('off') }}"

  kodi_repeat_one:
    sequence:
      - service: script.kodi_set_repeat
        data:
          repeat: "one"

  kodi_repeat_all:
    sequence:
      - service: script.kodi_set_repeat
        data:
          repeat: "all"

  kodi_repeat_off:
    sequence:
      - service: script.kodi_set_repeat
        data:
          repeat: "off"

  kodi_set_shuffle:
    sequence:
      - service: shell_command.curl
        data_template:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.SetShuffle"
            params:
              playerid: 1
              shuffle: "{{ shuffle|default(true, true) }}"

  kodi_shuffle_on:
    sequence:
      - service: script.kodi_set_shuffle
        data:
          shuffle: true

  kodi_shuffle_off:
    sequence:
      - service: script.kodi_set_shuffle
        data:
          shuffle: false<commit_msg>Update kodi control package<commit_after>################################################################
## Packages / Kodi Control
################################################################

homeassistant:
  customize:
    script.auto_cartoons:
      friendly_name: Cartoons
      icon: mdi:playlist-play

    script.auto_all_tv:
      friendly_name: All TV
      icon: mdi:playlist-play

    script.auto_pawpatrol:
      friendly_name: Paw Partol
      icon: mdi:playlist-play

script:
  ################################################
  ## Living Room Cartoons
  ################################################

  auto_cartoons:
    sequence:
      - service_template: >-
          script.kodi_play_file{{ '_bootup' if is_state('switch.living_room_pc', 'off') }}
        data:
          file: "c:/Users/Living Room/AppData/Roaming/Kodi/userdata/playlists/video/cartoon2.xsp"

  ################################################
  ## Living Room - All TV
  ################################################

  auto_all_tv:
    sequence:
      - service_template: >-
          script.kodi_play_file{{ '_bootup' if is_state('switch.living_room_pc', 'off') }}
        data:
          file: "c:/Users/Living Room/AppData/Roaming/Kodi/userdata/playlists/video/all.xsp"

  ################################################
  ## Living Room - Paw Patrol
  ################################################

  auto_pawpatrol:
    sequence:
      - service_template: >-
          script.kodi_play_file{{ '_bootup' if is_state('switch.living_room_pc', 'off') }}
        data:
          file: "c:/Users/Living Room/AppData/Roaming/Kodi/userdata/playlists/video/pawpatrol.xsp"

  ################################################
  ## Kodi Commands
  ################################################

  kodi_defaults:
    sequence:
      - service: shell_command.curl
        data: &defaults
          url: "http://192.168.1.76:8099/jsonrpc"
          method: "post"
          headers:
            content-type: "application/json"

  kodi_play_file:
    sequence:
      - service: shell_command.curl
        data_template:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.Open"
            params:
              item:
                file: "{{ file }}"

  kodi_play_file_bootup:
    sequence:
      - service: switch.turn_on
        entity_id: switch.living_room_pc
      - delay: '00:01:30'
      - service: script.kodi_play_file
        data_template:
          file: "{{ file }}"

  kodi_playpause:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.PlayPause"
            params:
              playerid: 1

  kodi_play:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.PlayPause"
            params:
              playerid: 1
              play: true

  kodi_pause:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.PlayPause"
            params:
              playerid: 1
              play: false

  kodi_stop:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.Stop"
            params:
              playerid: 1

  kodi_goto:
    sequence:
      - service: shell_command.curl
        data_template:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.GoTo"
            params:
              playerid: 1
              to: "{{ to }}"
  kodi_next:
    sequence:
      - service: script.kodi_goto
        data:
          to: "next"

  kodi_previous:
    sequence:
      - service: script.kodi_goto
        data:
          to: "previous"

  kodi_speed_1x:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.SetSpeed"
            params:
              playerid: 1
              speed: 1

  kodi_speed_2x:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.SetSpeed"
            params:
              playerid: 1
              speed: 2

  kodi_speed_4x:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.SetSpeed"
            params:
              playerid: 1
              speed: 4

  kodi_speed_8x:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.SetSpeed"
            params:
              playerid: 1
              speed: 8

  kodi_speed_16x:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.SetSpeed"
            params:
              playerid: 1
              speed: 16

  kodi_speed_32x:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.SetSpeed"
            params:
              playerid: 1
              speed: 32

  kodi_speed_n2x:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.SetSpeed"
            params:
              playerid: 1
              speed: -2

  kodi_speed_n4x:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.SetSpeed"
            params:
              playerid: 1
              speed: -4

  kodi_speed_n8x:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.SetSpeed"
            params:
              playerid: 1
              speed: -8

  kodi_speed_n16x:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.SetSpeed"
            params:
              playerid: 1
              speed: -16

  kodi_speed_n32x:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.SetSpeed"
            params:
              playerid: 1
              speed: -32

  kodi_seek_forward:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.Seek"
            params:
              playerid: 1
              value: "smallforward"

  kodi_seek_backward:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.Seek"
            params:
              playerid: 1
              value: "smallbackward"

  kodi_repeat_one:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.SetRepeat"
            params:
              playerid: 1
              repeat: "one"

  kodi_repeat_all:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.SetRepeat"
            params:
              playerid: 1
              repeat: "all"

  kodi_repeat_off:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.SetRepeat"
            params:
              playerid: 1
              repeat: "off"

  kodi_shuffle_on:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.SetShuffle"
            params:
              playerid: 1
              shuffle: true

  kodi_shuffle_off:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Player.SetShuffle"
            params:
              playerid: 1
              shuffle: false

  kodi_nav_back:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Input.Back"

  kodi_nav_select:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Input.Select"

  kodi_nav_left:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Input.Left"

  kodi_nav_right:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Input.Right"

  kodi_nav_up:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Input.Up"

  kodi_nav_down:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Input.Down"

  kodi_nav_home:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Input.Home"

  kodi_nav_info:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Input.Info"

  kodi_nav_show_osd:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Input.ShowOSD"

  kodi_nav_context_menu:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Input.ContextMenu"

  kodi_nav_show_codec:
    sequence:
      - service: shell_command.curl
        data:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Input.ShowCodec"

  kodi_exec_action:
    sequence:
      - service: shell_command.curl
        data_template:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Input.ExecuteAction"
            params:
              action: "{{ action }}"

  kodi_nav_page_down:
    sequence:
      - service: shell_command.curl
        data_template:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Input.ExecuteAction"
            params:
              action: "pagedown"

  kodi_nav_page_up:
    sequence:
      - service: shell_command.curl
        data_template:
          <<: *defaults
          payload:
            jsonrpc: "2.0"
            id: 1
            method: "Input.ExecuteAction"
            params:
              action: "pageup"
{'fraction_non_alphanumeric': 0.14621885875269292, 'fraction_numerical': 0.013202231674308125, 'mean_word_length': 1.418057967143048, 'pattern_counts': {'":': 0, '<': 96, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5918652', 'n_tokens_mistral': 5497, 'n_tokens_neox': 5165, 'n_words': 1050}