I have a Novy kitched hood that works on RF, and an AEG hob that sends IR commands. In between is an ESP32 MQTT device that translates. The AEG sends the IR command to HA, and then instructs the ESP to send the correspondig RF signal. This works for all the standard commands, with the help of a power measuring device on the hood power input to know it’s state.
However, on the AEG there is a button that cycles through AEG hood modes (1,2,3,4,off). My Novy hood only knows up and down. What i want to do is cycle through the modes and have a boolean set when it reaches mode 1 or 4. This way it knows to go down or up. But i can only tell which mode the hood is in, by measuring the power usage. For instance, around 24watts means the engine is running in mode 1.
I tried this in multiple automations like below, with a delay in between. It sort of works till it doesn’t. Sometimes the hood goes off (down sent to often even though it should’nt because the boolean and matching wattage instructs it to go up). I think the problem is in the wattage measuring. It’s just not accurate enough because the engine does not instantly change from 1 value to another. Moreover if i press the button a few times, the automations get queued and there i no way of knowing which part of the process we’re in.
The sending of AEG RF codes has to line up with the RF actions. It can’t be parallel.
Process should be as follows:
- AEG powers up, sends hood on code to HA
- HA sends 3 times RF up + light on to Novy hood (this is the default mode i want it on)
- Hood is now in mode 3
- Wife presses AEG cycle mode button a couple of times, sends multiple IR codes to HA
From here i want it to do the following:
- treat every IR code as a new request, queue them.
- send corresponding RF to Novy. (the first is easy, the wattage is settled, we’re in mode 3, boolean false, go up.
- the subsequent automations should wait until the engine is settled on the new wattage.
IR code in → RF code out → wait until mode is confirmed through wattage, queue subsequent requests and process 1 per Novy mode change confirmation
Does anyone know how to tackle this?
alias: Novy - manual stand 2/3 -> go down
description: Between 31 and 100w, boolean true, go down
trigger:
- platform: state
entity_id:
- sensor.last_rf_code
to:
- "0xE3C01BE2"
- "0xD051C301"
- "0xC22FFFD7"
- "0xB9121B29"
- "0x55303A3"
action:
- delay:
hours: 0
minutes: 0
seconds: 3
milliseconds: 0
- condition: and
conditions:
- condition: numeric_state
entity_id: sensor.keuken_wandschakelaar_electric_consumption_w_2
below: 100
above: 36
- condition: state
entity_id: input_boolean.novy_cycle_identifier
state: "on"
- device_id: e6d8a04dd19594ee2b4a36d80404c53d
domain: button
entity_id: button.afzuiging_2
type: press
mode: queued