How can I check in dzVents if a Group Scene is activated?
Is it like this:
Code: Select all
local TV = dz.groups('Ziggo TV')
if TV.state == 'On' then blabla
Moderator: leecollings
Code: Select all
local TV = dz.groups('Ziggo TV')
if TV.state == 'On' then blabla
Yes something like thatgschmidt wrote: ↑Saturday 01 May 2021 10:58 Hi,
How can I check in dzVents if a Group Scene is activated?
Is it like this:
or else?Code: Select all
local TV = dz.groups('Ziggo TV') if TV.state == 'On' then blabla
Code: Select all
return
{
on =
{
groups =
{
'Ziggo TV',
},
},
logging = {
level = domoticz.LOG_INFO,
marker = 'groupState',
},
execute = function(dz, item)
dz.groups().forEach(function(group)
dz.log('Group ' .. group.name .. '; State: ' .. group.state .. '; Active: ' .. dz.utils.toStr(group.active))
end)
if item.state == 'On' then
dz.log('\n\nGroup ' .. item.name.. ' is On')
end
end
}
Thanx, this is working indeed.waaren wrote: ↑Saturday 01 May 2021 19:36Yes something like thatgschmidt wrote: ↑Saturday 01 May 2021 10:58 Hi,
How can I check in dzVents if a Group Scene is activated?
Is it like this:
or else?Code: Select all
local TV = dz.groups('Ziggo TV') if TV.state == 'On' then blabla
Code: Select all
return { on = { groups = { 'Ziggo TV', }, }, logging = { level = domoticz.LOG_INFO, marker = 'groupState', }, execute = function(dz, item) dz.groups().forEach(function(group) dz.log('Group ' .. group.name .. '; State: ' .. group.state .. '; Active: ' .. dz.utils.toStr(group.active)) end) if item.state == 'On' then dz.log('\n\nGroup ' .. item.name.. ' is On') end end }
That is a different question then the topic title.gschmidt wrote: ↑Saturday 01 May 2021 20:31 Now if I switch from Scene 1 to Scene 3 (Netflix) the Ziggo Next Box turns off correctly.
But when I switch from Scene 3 to one of the other Scenes (Except Scene 1), those Scenes also want to Turn Off the Ziggo Next...but it is already Turned Off by switching from Scene 1 to Scene 3, As a result the Ziggo Next is turned On (the Off Command in the group has no effect) again because it is a Toggle Button.
Note: I also have created a Virtual Switch in Domoticz, which keeps track of the online/offline status of the Ziggo Next Box. (maybe this can be of use?)
Yes Sorry I know.waaren wrote: ↑Saturday 01 May 2021 21:07That is a different question then the topic title.gschmidt wrote: ↑Saturday 01 May 2021 20:31 Now if I switch from Scene 1 to Scene 3 (Netflix) the Ziggo Next Box turns off correctly.
But when I switch from Scene 3 to one of the other Scenes (Except Scene 1), those Scenes also want to Turn Off the Ziggo Next...but it is already Turned Off by switching from Scene 1 to Scene 3, As a result the Ziggo Next is turned On (the Off Command in the group has no effect) again because it is a Toggle Button.
Note: I also have created a Virtual Switch in Domoticz, which keeps track of the online/offline status of the Ziggo Next Box. (maybe this can be of use?)
You need a conditional action and that is not possible in a scene or group. You could solve it by removing the Ziggo next On/Off button from your scenes and use a dzVents script triggered by any of the described scenes and let the script perform the required action on the button.
Indeed.
Users browsing this forum: No registered users and 1 guest