Add support for logical switch backed by physical switches
Hi, 

Love your plugin to control my Sonoff DualR3.

I'm actually using it for an interesting config.   My wife bought this fancy dimming floor lamp that uses a foot switch.  However, it's not automate-able via a standard smart wall plug.  It turns out that while it has 3 wires coming from the socket (L, N, G) to the foot switch, it has 4 wires going to the lamp (L1, L2, N, G).  L2 is permanently wired to L from the socket and L1 is toggled by the foot switch.  A simple tap turns on/off lamp.  A press and hold dims the lamp.  Fun!

Anyway, I picked up a DualR3 relay and wired it an external electrical box in lieu of the foot switch.  Basically, I wired up L2 to channel 2, which I leave always on in order to maintain dim setting, and I wired L1 to channel 1.  I declared channel 1 as a momentary switch with inching of 0.5s via the ewelink app.  It all works like a champ with HomeKit via your plugin.

However, there is one draw back, because it's a momentary switch, the actual "on" state of the lamp is not reflected in HomeKit.

I was wondering if it might be possible to add the concept of a logical switch that consists of feedback from channel 1 and channel 2 switches.  Basically the following:

- On action: Issue channel 1 ON command
- Off action: Issue channel 1 ON command
- Is On: Look at power consumption of channel 2 (> 5W)
- Is Off: Look at power consumption of channel 2 (<1.5 W)

Would be neat if all of this was configurable (such as channel assignments, power thresholds, etc) via the plugin settings.

What do you think?