• Ludicrous0251@piefed.zip
    link
    fedilink
    English
    arrow-up
    13
    ·
    18 hours ago

    44 automations + 27 scripts and counting, not sure any of them are totally over the top but theres at least 2 dedicated buttons in my house for when the dog needs to take a shit in the middle of the night to turn on specific lights for a short time for him.

    Unfortunately I haven’t taught him to use them on his own.

    • TedZanzibar@feddit.uk
      link
      fedilink
      English
      arrow-up
      2
      ·
      5 hours ago

      Curious as to what you’re using scripts for? I have 88 automations and have so far found no need for a single script and I feel like I’m missing a trick somewhere.

      Yes, I do have some automations that share functionality but it’s one or two actions and it seems redundant to call a separate script.

      • Ludicrous0251@piefed.zip
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 hours ago

        Scripts are used for a lot of things! Generally any time I want to do the same thing under multiple automations, I use a script as the middleman.

        For example, I built a script for turning off all of my lights each night but it has to be fed a time scaling variable to determine specifically how quickly to turn them off (sometimes I want them turned off quickly vs slowly). Automations trigger said script with the right scale factor.

        I have air purifiers that I ramp up and down conditionally, they don’t have a built in ramping function so I built a script to ramp them to a target % in their allowed 10% increments, over a variable time period. This can be then be called in one line from any automation or script.

        When I’m turning off lights each night, I want them to ramp down to a specific level/color/temperature before turning off but only if they are currently on. Rather than build an if statement for every light, a script takes a input list of lights and runs through each one to determine whether or not to ramp.

        Finally, my Google Home device is able to call scripts directly, (“hey Google, activate Cozy Time” triggers the “Cozy Time” script) so some things I use Google Assistant to trigger use scripts directly since that was at least easier at the time than using an automation. If I automate the same thing (e.g., a “Cozy Time” button above), I can just call the script from the automation in one line, easy peasy.

      • liquidambar@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        3 hours ago

        600+ automations, 500+ scripts :( My house runs itself, and has its own moods. If it’s in a goth persona and feeling miserable (which it usually is when in a goth persona), it’ll change some of the light colors to apocalypse of blood.