WLED en Home Assistant – trabajando con segments y presets

En esta ocasión vamos a cambiar el modo de funcionamiento de efectos a predefinidos , lo primera crearemos un par de input_boolean

  input_presets_wled_arbol:
    name: Efectos predefinidos arbol
    # initial: off
    icon: mdi:heart-settings
  
  input_presets_wled_balcon:
    name: Efectos predefinidos balcon
    # initial: off
    icon: mdi:heart-settings

En customize haremos que sean persistentes

input_boolean.input_presets_wled_arbol:
  persistent: true
input_boolean.input_presets_wled_balcon:
  persistent: true

Añadiremos un par de inputs selects que iran en consonancia con los presets definidos previamente en wled

  wled_presets_arbol:
    name: WLED Predefinidos Arbol
    options:
      - "01 - Navidad 1"
      - "02 - Navidad 2"
      - "03 - Navidad 3"
      - "04 - Navidad 4"
      - "05 - Navidad 5"
      - "06 - Navidad 6"
      - "07 - Navidad 7"
      - "08 - Navidad 8"
      - "09 - Navidad 9"
      - "10 - Navidad 10"
      - "11 - Navidad 11"
      - "12 - Navidad 12"
      - "13 - Navidad 13"
      - "14 - Navidad 14"
      - "15 - Navidad 15"
      - "16 - Navidad 16"
    icon: mdi:heart-settings

  wled_presets_balcon:
    name: WLED Predefinidos Balcon
    options:
      - "01 - Navidad 1"
      - "02 - Navidad 2"
      - "03 - Navidad 3"
      - "04 - Navidad 4"
      - "05 - Navidad 5"
      - "06 - Navidad 6"
      - "07 - Navidad 7"
      - "08 - Navidad 8"
      - "09 - Navidad 9"
      - "10 - Navidad 10"
      - "11 - Navidad 11"
      - "12 - Navidad 12"
      - "13 - Navidad 13"
      - "14 - Navidad 14"
      - "15 - Navidad 15"
      - "16 - Navidad 16"
    icon: mdi:heart-settings

Estos serian los presets que cree yo para el árbol con los colores y efectos mas en consonancia con la navidad

{"0":{},"1":{"n":"navidad 1","on":true,"bri":255,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":66,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":1,"start":66,"stop":132,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":true,"mi":false},{"id":2,"start":132,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":3,"start":0,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":128,"pal":3,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]},"2":{"n":"navidad 2","on":true,"bri":255,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":66,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":1,"start":66,"stop":132,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":true,"mi":false},{"id":2,"start":132,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":3,"start":0,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":32,"sx":128,"ix":128,"pal":3,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]},"3":{"n":"navidad 3","on":true,"bri":255,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":66,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":1,"start":66,"stop":132,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":true,"mi":false},{"id":2,"start":132,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":3,"start":0,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":34,"sx":128,"ix":128,"pal":3,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]},"4":{"n":"navidad 4","on":true,"bri":255,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":66,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":1,"start":66,"stop":132,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":true,"mi":false},{"id":2,"start":132,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":3,"start":0,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":74,"sx":128,"ix":128,"pal":3,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]},"5":{"n":"navidad 5","on":true,"bri":255,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":66,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":1,"start":66,"stop":132,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":true,"mi":false},{"id":2,"start":132,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":3,"start":0,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":7,"sx":128,"ix":128,"pal":3,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]},"6":{"n":"navidad 6","on":true,"bri":255,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":66,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":1,"start":66,"stop":132,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":true,"mi":false},{"id":2,"start":132,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":3,"start":0,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":90,"sx":128,"ix":128,"pal":3,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]},"7":{"n":"navidad 7","on":true,"bri":255,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":66,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":1,"start":66,"stop":132,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":true,"mi":false},{"id":2,"start":132,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":3,"start":0,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":87,"sx":128,"ix":128,"pal":3,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]},"8":{"n":"navidad 8","on":true,"bri":255,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":66,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":1,"start":66,"stop":132,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":true,"mi":false},{"id":2,"start":132,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":3,"start":0,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":101,"sx":128,"ix":128,"pal":3,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]},"9":{"n":"navidad 9","on":true,"bri":255,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":66,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":1,"start":66,"stop":132,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":true,"mi":false},{"id":2,"start":132,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":3,"start":0,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":63,"sx":128,"ix":128,"pal":3,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]},"10":{"n":"navidad 10","on":true,"bri":255,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":66,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":1,"start":66,"stop":132,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":true,"mi":false},{"id":2,"start":132,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":3,"start":0,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":108,"sx":128,"ix":128,"pal":3,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]},"11":{"n":"navidad 11","on":true,"bri":255,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":66,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":1,"start":66,"stop":132,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":true,"mi":false},{"id":2,"start":132,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":3,"start":0,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":61,"sx":128,"ix":128,"pal":3,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]},"12":{"n":"navidad 12","on":true,"bri":255,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":66,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":1,"start":66,"stop":132,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":true,"mi":false},{"id":2,"start":132,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":3,"start":0,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":44,"sx":128,"ix":128,"pal":3,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]},"13":{"n":"navidad 13","on":true,"bri":255,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":66,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":1,"start":66,"stop":132,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":true,"mi":false},{"id":2,"start":132,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":3,"start":0,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":56,"sx":128,"ix":128,"pal":3,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]},"14":{"n":"navidad 14","on":true,"bri":255,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":66,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":1,"start":66,"stop":132,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":true,"mi":false},{"id":2,"start":132,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":3,"start":0,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":81,"sx":128,"ix":128,"pal":3,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]},"15":{"n":"navidad 15","on":true,"bri":255,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":66,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":1,"start":66,"stop":132,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":true,"mi":false},{"id":2,"start":132,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":3,"start":0,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":4,"sx":128,"ix":128,"pal":3,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]},"16":{"n":"navidad 16","on":true,"bri":255,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":66,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":1,"start":66,"stop":132,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":true,"mi":false},{"id":2,"start":132,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":114,"sx":128,"ix":255,"pal":3,"sel":false,"rev":false,"mi":false},{"id":3,"start":0,"stop":198,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0],[8,255,0],[0,0,0]],"fx":81,"sx":128,"ix":128,"pal":3,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]}}

Con el comando &PL= aplicaremos el preset que deseemos , por lo que crearemos las automatizaciones pertinentes que lo hagan funcionar

#################################################
#### Automatizaciones luces navidad predefinidos
#################################################   
     
- alias: cambio de efecto en wled predefinido tira led balcon si tiempo ON
  id: cambio de efecto en wled predefinido tira led balcon si tiempo ON
  initial_state: 'on'
  trigger:
    - platform: time_pattern
      minutes: '/1'
      seconds: 00
  condition:
    - condition: state
      entity_id: input_boolean.input_aleatorio_wled_balcon
      state: 'off'
    - condition: state
      entity_id: input_boolean.input_presets_wled_balcon
      state: 'on'      
    - condition: state
      entity_id: sensor.luces_wled_balcon_encendido
      state: 'on'
    - condition: state
      entity_id: input_boolean.input_temporizador_wled_balcon
      state: 'on'    
  action:
    - service: light.turn_on  
      data:
        entity_id: light.wled_balcon
    - service: input_select.select_next
      entity_id: input_select.wled_presets_balcon
    # Enviamos el efecto
    - data_template:
        topic: "wled/balcon/api"
        payload: 'PL={{ states(''input_select.wled_presets_balcon'')[:2] }}'
      service: mqtt.publish


- alias: cambio de efecto en wled predefinido tira led arbol si tiempo ON
  id: cambio de efecto en wled predefinido tira led arbol si tiempo ON
  initial_state: 'on'
  trigger:
    - platform: time_pattern
      minutes: '/1'
      seconds: 00
  condition:
    - condition: state
      entity_id: input_boolean.input_aleatorio_wled_arbol
      state: 'off'
    - condition: state
      entity_id: input_boolean.input_presets_wled_arbol
      state: 'on'      
    - condition: state
      entity_id: sensor.luces_wled_arbol_encendido
      state: 'on'
    - condition: state
      entity_id: input_boolean.input_temporizador_wled_arbol
      state: 'on'    
  action:
    - service: light.turn_on  
      data:
        entity_id: light.wled_arbol
    - service: input_select.select_next
      entity_id: input_select.wled_presets_arbol
    # Enviamos el efecto
    - data_template:
        topic: "wled/arbol/api"
        payload: 'PL={{ states(''input_select.wled_presets_arbol'')[:2] }}'
      service: mqtt.publish

En el balcón haremos lo mismo pero teniendo en cuenta los tres segmentos en los que se ha dividido la tira de 200 leds

Y el resultado final de estos presets seria algo como esto …

Y con esto y un bizcocho …..

BONUS : Cambio de presets con el pulsador

Por defecto la pulsación media ( de uno a seis segundos ) cambia de efecto , pero no de preset , si queremos cambiar presets tendremos que hacer lo siguiente :

Crear un nuevo preset por ejemplo el 250 , que contenga en el campo API esta cadena de texto win&P1=1&P2=16PL=~ , en P1 pondremos el primer preset del ciclo , y en P2 el ultimo preset del ciclo

Lo guardaremos y le diremos que inicie al arrancar el preset 250

Aquí están los ficheros de configuración y de presets de cada uno los dispositivos

Deja un comentario