Blocky problem, want to "copy" a switch

Moderator: leecollings

Post Reply
Zuikkis
Posts: 43
Joined: Monday 20 February 2017 17:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Blocky problem, want to "copy" a switch

Post by Zuikkis »

I'm trying to copy state of "Takkahuone Tellstick" to "Takkahuone".

The attached blocky creates error "Error: EventSystem: Malformed action sequence!"

Maybe I need to do separate check for On/Off and then set to On or Off? Not copy switch state like that. But it's weird that direct copy doesn't work, don't you think?
Attachments
Screenshot at 2017-04-09 14-00-46.png
Screenshot at 2017-04-09 14-00-46.png (9.46 KiB) Viewed 888 times
Zuikkis
Posts: 43
Joined: Monday 20 February 2017 17:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Blocky problem, want to "copy" a switch

Post by Zuikkis »

Ended up doing it in lua instead:

Code: Select all

commandArray = {}
if (devicechanged['Takkahuone'] == 'On' and otherdevices['Takkahuone Tellstick'] == 'Off') then
        commandArray['Takkahuone Tellstick']='On'
elseif (devicechanged['Takkahuone'] == 'Off' and otherdevices['Takkahuone Tellstick'] == 'On') then
        commandArray['Takkahuone Tellstick']='Off'
elseif (devicechanged['Takkahuone Tellstick'] == 'On' and otherdevices['Takkahuone'] == 'Off') then
        commandArray['Takkahuone']='On'
elseif (devicechanged['Takkahuone Tellstick'] == 'Off' and otherdevices['Takkahuone'] == 'On') then
        commandArray['Takkahuone']='Off'
end

return commandArray
Works fine, and works in both directions.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest