I'm rebuilding my water system on :
espeasy mega-20210503 - stable release / ESPEasy_normal_ESP8266_4M1M
wemos D1 mini
(relay board, PCF8575, ADS1115, OLED SSD1306, TTP223 tactil button, ...)
As devices, I've got 2 dummies :
-1st : manager
* menu | from 0 to 2 -> create a custom menu disply
* selected | from 0 to 3 -> select a zone to be watered
* status |tbd
* duration |tbd
-2nd : duration
* dur_1
* dur_2
* dur_3
I've got 4 switches basic with their states :
* relay_0 | state
* relay_1 | state
* relay_2 | state
* relay_3 | state
reading pin state from PCF8574
and some other switch/button
in rules, the writing :
Code: Select all
[relay_[manager#selected]#state]
Code: Select all
[duration#dur_[manager#selected]]
Code: Select all
]
Is there any way to get it works, write it differently, make any modification in the code and rebuild it? preventing from multi if statement.
I've try to search, but I may not have the right keywords...