• Ludicrous0251@piefed.zip
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 days ago

    snapshot_entities: | {{ states.light | map(attribute='entity_id') | list }}

    This is the only part I’m unsure about, seems like a clunky way to get all of the lights, but if only certain ones are causing problems, I’d just put the problem ones here as a list (or create a light group in HA and only call that group

    Also, input_boolean.ups_power feels like ChatGPT is assuming you have a helper for the current power status, but I would just call directly from the UPS entity. You should be able to clean this up in the GUI.

    • TedZanzibar@feddit.uk
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 days ago

      That first line is what CGPT helped me with. I wanted something that I don’t need to modify when I add or remove lights, so this just gets everything. Ideally I’d just get the lights that don’t have the power restore feature but most of my lights go via Hue and that doesn’t expose the feature to HA at all.

      The input_boolean is a thing I already had setup. The UPS fires a webhook event when it goes in and out of battery mode and there’s a separate automation that switches the helper based on those.