Mapping out logic flows for instantiation within HA

Greetings,

I’ve got an automation scheme I want to instantiate in Home Assistance. Most likely in Node Red, but maybe just straight YAML, TBD.

There are two Philips Hue bulbs I want to use for signalling purposes for:

  1. Alerting in blue when one of two freezers have been left open.
  2. Alerting in red when the stove has been on for more than 30 minutes.
  3. Switched to 25% Brightness at a white color when the TV is on.

I’ve got discrete automations to do all this, but they don’t interact particularly well. There are a number of permutations, particularly the stove, with four automations handling the various modes.

I find crafting logic in yaml fairly difficult, thus the thought of doing this in node red. I could see this being a state-machine type of thing, switching from state to state as the various sensors/controls dictate.

Any suggestion about a logic mapping tool that I could create my system in that would then be straightforward to migrate to Home Assistant? FOSS would be my first choice if possible.

Thanks

What sensors are you using to determine the status of your freezers, stove, and TV?
What data do they produce?

The temp sensors are Govee Temp/Humidity BLE talking through a Bluetooth proxy. The TV I get info from Android TV integration.

Can you start by writing/drawing out the logic you want to achieve? Paper and pen often work for me.
Based on that there will probably be multiple ways to achieve what you want.

Please elaborate on this.

What do you mean by not interacting well?

Map out your modes and rules. What are the priorities? Stove over freezer over TV? Are certain times of day excluded? Etc.

Okay,

This was a PITA. I created the logic in Trilium and attempted (and failed) to paste here with the formatting.

Here is the logic:

1) Stove:
	a) When Delta T is > 20°F and is increasing;
		i) Make note of light setting before changes.
		ii) Switch lights on at 25% brightness in Red.
		iii) Increase brightness from 25% to 100% as the time elapses to 30 minutes.
		iv) At 30 minutes, flash bulb at full brightness in red every second.
	b) When Delta T Is > 20°F and is decreasing;
		i) When Delta T has dropped 20°F below maximum, cease flashing.
		ii) As Delta T declines, reduce brightness to 25% at Delta T = 20°F.
		iii) When Delta T Is < 20°F return bulb to state 1.a.i
2) Freezer(s):
	a) When T Is > 10°F and temperature is increasing;
		i) Make note of light setting before changes.
		ii) Switch lights on at 25% brightness in Blue.
		iii) Increase brightness to 100%, as T gets climbs to 20°F.
		iv) At T = 20°F, flash bulb at full brightness in blue every second.
	b) When T is > 10°F and is decreasing;
		i) When T has dropped below 20°F, cease flashing.
		ii) Reduce brightness as temperature decreases to 25% at T = 10°F.
		iii) When T Is < 10°F return bulb to state before 2.a.i
3) TV Switch:
	a) If either of the freezer or stove automation's is engaged, bypass;
		i) When the TV Remote is turned on, switch the bulb on at 25% brightness in White.
		ii) When the TV remote is turned off, switch the bulb off.

When I say they aren’t interacting well, it’s due to the fact that the same signalling mechanism (the Hue bulbs) are used for 3 separate processes.

Click on the ‘gear’ icon and then the ‘</>’ one saying ‘preformatted text’ that will help you of it is code-like language.

Thank you for taking the time, as I understand it you would like to have the bulbs display more than one state. In order to do that, you’ll either have to settle on a new color for double-states, or have to create a pattern the bulbs can follow that they loop through.

Each has its own merits the color changing one will probably be the hardest.

Some links to get you started:

Thank you. Reformatted.

I have automations to do the activities. No issues there.

The crux of the matter is I need to craft a logic flow so that all three activities can utilize the one signalling tool without stepping all over each other, which is what I have now.

I’ll have a lookie see at the links to see if there is something there that can help.

cheers,