What mean is a device that will let me cache a value and then recall it later in an automation?

As an simple example, I have a room light on a smart switch and in that room I also have a lamp plugged in to a smart outlet. I want to be able to use the smart switch to toggle through both lighs, but only if both lights are off when i press the switch. If one lamp is on already, it should start by turning it off. If neither is on, start by turning on the room light, and on the second press turn on the lamp and on third turn off the room etc.

(I know there are multiple ways to do this, but for sake of example)

My thought is that I could check my cache state and if it is “0” AND all lamps are off then I would turn on the first one in the series and set this cache to “1” with a timer to set it back to “0” in 10 seconds. As long as the value is “1” the switch would cycle through lamp/light combos, but once that cached value is back at 0, the switch defaults back to turn lights.

I know I could probably make something work with a hidden rgb light, but I wondered if there was something more elegant

1 point

Doing this with Home Assistant wouldn’t be too bad.

permalink
report
reply
1 point

Congratulations! You’ve invented variables!

Pretty sure every home automation controller known to man supports them.

However, every situation is unique, and sometimes you need duct, tape and glue.

Embed your hidden RGB light in a black cube of plastic, and now you have invented the “variable dongle “.

permalink
report
reply

Home Automation

!homeautomation@selfhosted.forum

Create post

Home automation is the residential extension of building automation.

It is automation of the home, housework or household activity.

Home automation may include centralized control of lighting, HVAC (heating, ventilation and air conditioning), appliances, security locks of gates and doors and other systems, to provide improved convenience, comfort, energy efficiency and security.

Warning: Working with electricity can result in injury, property damage, or even death if it is not done properly. Please keep this in mind while assisting others. If you are not sure about what you are doing, hire a licensed professional.

Rules

  • No abusive behaviour. This is a forum for friendly discussion; personal attacks will not be tolerated and you will be banned without warning.
  • Referral/affiliate links are NOT ALLOWED!
  • NO POLITICS! There are plenty of other communities to discuss them; this is not one.
  • When posting project details must be included. Posting a video or image without detail will result in a removed post and may result in a ban.
  • Crowdfunding links are not allowed.
  • Reposts, low-effort content and karma farming may be removed at the discretion of the mods. Posters may be banned without warning.

Community stats

  • 2

    Monthly active users

  • 598

    Posts

  • 2.8K

    Comments

Community moderators