Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)T
Posts
6
Comments
196
Joined
3 yr. ago

  • Got a little help from CGPT so it might not be perfect, but this seems to work from my limited testing:

     
        
    triggers:
      - trigger: state
        entity_id:
          - input_boolean.ups_power
    conditions: []
    actions:
      - choose:
          - conditions:
              - condition: state
                entity_id: input_boolean.ups_power
                state:
                  - "on"
            sequence:
              - action: scene.create
                data:
                  scene_id: light_states_backup
                  snapshot_entities: |
                    {{ states.light | map(attribute='entity_id') | list }}
          - conditions:
              - condition: state
                entity_id: input_boolean.ups_power
                state:
                  - "off"
            sequence:
              - action: scene.turn_on
                target:
                  entity_id: scene.light_states_backup
                data: {}
              - delay:
                  hours: 0
                  minutes: 0
                  seconds: 10
                  milliseconds: 0
              - action: scene.delete
                data:
                  entity_id: scene.light_states_backup
    mode: single
    
      

    I've only tested it by toggling the UPS boolean manually and not actually cutting the power, so I'm probably going to need to add a delay, or a retry loop or something to make sure the scene applies consistently but so far so good! Thanks for the inspiration.

  • Thank you. I've also never used scenes beyond what comes built-in with Hue! This is all good stuff.

  • Thank you, that's food for thought at least.

    Can I ask about your light script? I have a bunch of smart bulbs that either don't support or don't expose the 'power-on behaviour' option, so in a power cut they come on full bright when power is restored, often in the middle of the night.

    My HA is on a UPS so I've been trying to have it store the states of lights when the UPS switches to battery power (before they go to unavailable) and then restore those states when power comes back, but it's apparently way beyond my skill set. Curious as to how your "input list of lights" works and whether it could help me...

  • 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.

  • Laziest eh? Probably the one that deletes completed items from my shopping list when I leave the supermarket, because I got sick of doing it manually.

    Most ridiculous would be the NFC tag I have on the lid of my cold brew coffee jug. I make a batch so rarely that I can never remember how much coffee to add, so scanning the tag makes my Google Home say; "You want 80g of coffee per litre, or 6 scoops."

  • Thanks, yeah, as much as it feels like an overly complicated way of doing things, I think I'm erring towards just biting the bullet and making contacts. Appreciate your detailed reply!

  • Sysadmin @lemmy.world

    Correct way to redirect emails in 365? Authoritative vs Internal Relay

  • Exactly this. We used to run Mattermost (essentially Slack but hosted on-prem) and Zoom, and everybody loved the combination. Then the bean counters got involved, saw that we were paying extra for something that was already included with our 365 subscription, and that was that.

    Now we're stuck with shitty Teams and its shitty Electron app that seems to come up with new ways to not work on a near daily basis. So much so that "Teams be Teamsing" has become a defacto phrase for when something janky happens.

  • Dammit, I was looking forward to SoT seeing as it plays pretty janky now compared to modern standards and I was hoping they'd fix up the combat a bit. That said, I only have the Xbox version to go off of. Is the PC version any good? Maybe someone will do a Black Mesa on it.

  • Especially if it has mint frosting.

  • Fun

    Jump
  • Tell that to Michel Lotito who, allegedly, ate an entire Cessna 150.

  • Yeah I was wondering the same thing. Didn't Abort just cancel trying to read that sector, while Fail would cancel the entire operation?

    Nope, I looked it up. Abort would completely abort the whole thing, while Fail was supposed to return an error code to the program so that it could decide what to do next. Like Ignore but less crashy.

  • (A)bort, (R)etry, (F)ail?

  • They taste that way on purpose to stop little kids from putting them in their mouths and potentially choking.

  • Remember how sometimes you'd put the disk in and you could hear the floppy part spinning for a fraction of a second to line up with, I guess the motor head, before it fully clunked in? That shit was peak.

  • Synology walked back their requirement of using their own branded drives.

    First I've heard of this but you're right.

    It's really interesting how far I had to scroll down the search results to find it, as the top page or so of hits are from April when they added the restriction in the first place.

  • Vivaldi is Chromium based, that's like jumping out of the frying pan into the fire.

    There are plenty of Firefox forks that will be actively removing the AI crap. Waterfox, Pale Moon, Librewolf, Zen, Floorp to name a few. And these will all continue to support Manifest v2 and therefore adblockers. https://en.wikipedia.org/wiki/Category:Web_browsers_based_on_Firefox

  • I'm kinda sad that I probably* won't get to see how this story ends. Do we make it as a species? Do we end up in the Star Trek utopia, or do we wipe ourselves out with our own hubris? But I'm not sad of afraid of dying itself. My legacy will be doing right by my kids and hopefully setting them up to live better lives than I did, and I'm OK with that.

    *If I do live long enough to see us wipe ourselves out that will be pretty shit, ngl.

  • You might be a king or a little street sweeper but sooner or later you dance with the reaper.

  • Does this mean that people will finally stop posting that stupid "sir, this is a Wendy's" line?

  • PC Master Race @lemmy.world

    First desktop PC in 15 years. Help me feel good about buying a Dell!

  • Smart Homes @feddit.uk

    Any solution for controlling dumb shutters?

  • Selfhosted @lemmy.world

    Recommendations for running VMs on a headless server?

  • Selfhosted @lemmy.world

    Just how secure are the various reverse proxy options?

  • Selfhosted @lemmy.world

    How safe is self-hosting a public website behind Cloudflare?