Selector switch & Inverted blind

Moderator: leecollings

Post Reply
User avatar
najtram
Posts: 62
Joined: Wednesday 26 April 2017 11:50
Target OS: Raspberry Pi / ODroid
Domoticz version: v4.9700
Location: Netherlands
Contact:

Selector switch & Inverted blind

Post by najtram »

Can some help me with the Close or off. Both doesn't seem to work.

This is my first (self made) Lua script and I set it to "device".
So the state "Open" works. But "Close" or "Off" doesn't!

R1 is inverted blind switch
R2 is selector switch

Code: Select all

commandArray = {}

if devicechanged['RolgordijntestR1'] == 'Close' then
      commandArray['RolgordijntestR2']='Set Level: 10'
end

if devicechanged['RolgordijntestR1'] == 'Open' then --Inverted blind switch
      commandArray['RolgordijntestR2']='Set Level: 20' -- Works!
end

if devicechanged['RolgordijntestR1'] == 'Off' then
      commandArray['RolgordijntestR2']='Set Level: 30'
end

return commandArray
RFLink Gateway → 433Mhz/KAKU switches
Z-Wave → Z-Stick Gen5+
ZigBee → ConBee II
Bluetooth → Soma Smart Shades
Opentherm Gateway → Remeha iSense - Tzerra boiler
ESP8266+CC1101 → ITHO ecofan RFT
P1 cable → DSMR 2.2+ Landys +gyr E350
LAN → Enphase Envoy
tozzke
Posts: 135
Joined: Friday 02 January 2015 9:22
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Selector switch & Inverted blind

Post by tozzke »

Try 'Closed' ;)
User avatar
najtram
Posts: 62
Joined: Wednesday 26 April 2017 11:50
Target OS: Raspberry Pi / ODroid
Domoticz version: v4.9700
Location: Netherlands
Contact:

Re: Selector switch & Inverted blind

Post by najtram »

You are a genius! Thanks.
RFLink Gateway → 433Mhz/KAKU switches
Z-Wave → Z-Stick Gen5+
ZigBee → ConBee II
Bluetooth → Soma Smart Shades
Opentherm Gateway → Remeha iSense - Tzerra boiler
ESP8266+CC1101 → ITHO ecofan RFT
P1 cable → DSMR 2.2+ Landys +gyr E350
LAN → Enphase Envoy
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest