
Kanske enklast med ett extra argument i TwoWaySwitch pluginet, typ "<add twoWaySwitchTargetCode="B:3" twoWaySwitchListenerCodes="A:1,C:3" commandThresholdMs="1000" toggle="false" />
Men...under tiden skulle jag testa detta...
Code: Select all
private DeviceEventContainer ModifyFeaturedEvent(IDictionary<string, object> eventParams, TwoWaySwitchConfigurationItem? configItem, DeviceEventContainer c)
{
// The event the sending device was causing...
var operation = eventParams.ContainsKey(PARAM_NAME__FEATURED_EVENT) ? eventParams[PARAM_NAME__FEATURED_EVENT].ToString() : (string)null;
if (c.LastEvent != null)
{
//if (FEATURED_EVENT__TURN_ON.Equals(c.LastEvent))
if (FEATURED_EVENT__TURN_OFF.Length > 0)
eventParams[PARAM_NAME__FEATURED_EVENT] = FEATURED_EVENT__TURN_OFF;
//else if (FEATURED_EVENT__TURN_OFF.Equals(c.LastEvent))
else if (FEATURED_EVENT__TURN_ON.Length > 0)
eventParams[PARAM_NAME__FEATURED_EVENT] = FEATURED_EVENT__TURN_ON;
}
..
..

