Ascari
(Arancio Vincent)
December 30, 2018, 9:49pm
1
Hello me again
My work of inclusion finish, my things, my items and sitemaps done now the rules.
I’m block with the updating of a virtual switch
My rule
when
Item Salon_Motion changed from OFF to ON
then
Reveil.SendCommand(ON)
...
My error
The method SendCommand(OnOffType) is undefined for the type SwitchItem
My item simple :
Switch Reveil
And I have also a another question, what the best practice:
Multiple files rules, or just one for all ?
tHX
Ascari
(Arancio Vincent)
December 30, 2018, 9:54pm
2
AutoSolve : postUpdate(Reveil, ON)
vzorglub
(Vincent Regaud)
December 31, 2018, 12:29am
3
Ascari:
postUpdate(Reveil, ON)
Reveil.postUpdate(ON)
is the recommended syntax
If Reveil
is a Switch item then Reveil.sendCommand(ON)
should work
rossko57
(Rossko57)
December 31, 2018, 2:02am
4
You can have multiple. As your rules develop in number, you’ll probably find it easier to manage if you split them by function e.g. lighting.rules. alarm.rules
1 Like