Commit 93d0256d authored by Alexis Brenon's avatar Alexis Brenon
Browse files

🍒 4ecc94cc Use a wider restricted env

parent 839daa91
......@@ -296,34 +296,75 @@ class.SENSORS_GLOBAL = {
class.USER_LOCATIONS_RESTRICTED = {
'kitchen',
'bedroom',
-- 'study'
}
class.USER_ACTIVITIES_RESTRICTED = {
'eat',
-- 'clean',
'sleep',
-- 'read',
-- 'phone',
'dish',
'cook',
'tidy',
'none',
}
class.USER_ACTIVITIES_RESTRICTED = {'eat', 'sleep', 'tidy', 'none'}
class.USER_COMMANDS_RESTRICTED = {
'light - on',
'light - off',
'radio - on',
'radio - off',
'blind - open',
'blind - close',
-- 'curtain - open',
-- 'curtain - close',
-- 'tts - time',
-- 'tts - temperature',
-- 'phone - help',
-- 'phone - son'
}
class.AVAILABLE_COMMANDS_RESTRICTED = {
'light - on',
'light - off',
'radio - on',
'radio - off',
'blind - open',
'blind - close',
-- 'curtain - open',
-- 'curtain - close',
-- 'tts - time',
-- 'tts - temperature',
-- 'phone - help',
-- 'phone - son',
'none'
}
class.COMMAND_LOCATION_RESTRICTED = {
light = {
-- "kitchen - all",
"kitchen - sink",
"kitchen - ceiling",
-- "bedroom - all",
"bedroom - bed",
"bedroom - ceiling",
-- "study - ceiling"
},
radio = {'bedroom'},
blind = {
"kitchen",
"bedroom",
-- "study"
},
curtain = {'bedroom'},
tts = {
"kitchen",
"bedroom",
"study"
},
phone = {'study'},
none = {'none'},
}
class.BASE_MODEL_RESTRICTED = {
['none'] = {
['any'] = {
......@@ -338,12 +379,23 @@ class.BASE_MODEL_RESTRICTED = {
['eat'] = {{'light - on', 'kitchen - ceiling'}},
['dish'] = {{'light - on', 'kitchen - sink'}},
['cook'] = {{'light - on', 'kitchen - sink'}},
['any'] = {{'light - on', 'kitchen - ceiling'}}
['any'] = {
-- {'light - on', 'kitchen - all'},
{'light - on', 'kitchen - sink'},
{'light - on', 'kitchen - ceiling'},
}
},
['bedroom'] = {
['sleep'] = {{'light - on', 'bedroom - bed'}},
['any'] = {{'light - on', 'bedroom - ceiling'}}
['any'] = {
-- {'light - on', 'bedroom - all'},
{'light - on', 'bedroom - bed'},
{'light - on', 'bedroom - ceiling'},
}
},
['study'] = {
['any'] = {{'light - on', 'study - ceiling'}},
}
},
['light - off'] = {
......@@ -351,12 +403,34 @@ class.BASE_MODEL_RESTRICTED = {
['eat'] = {{'light - off', 'kitchen - ceiling'}},
['dish'] = {{'light - off', 'kitchen - sink'}},
['cook'] = {{'light - off', 'kitchen - sink'}},
['any'] = {{'light - off', 'kitchen - ceiling'}}
['any'] = {
-- {'light - off', 'kitchen - all'},
{'light - off', 'kitchen - sink'},
{'light - off', 'kitchen - ceiling'},
}
},
['bedroom'] = {
['sleep'] = {{'light - off', 'bedroom - bed'}},
['any'] = {{'light - off', 'bedroom - ceiling'}}
['any'] = {
-- {'light - off', 'bedroom - all'},
{'light - off', 'bedroom - bed'},
{'light - off', 'bedroom - ceiling'},
}
},
['study'] = {
['any'] = {{'light - off', 'study - ceiling'}},
}
},
['curtain - open'] = {
['any'] = {
['any'] = {{'curtain - open', 'bedroom'}}
}
},
['curtain - close'] = {
['any'] = {
['any'] = {{'curtain - close', 'bedroom'}}
}
},
['blind - open'] = {
......@@ -366,6 +440,9 @@ class.BASE_MODEL_RESTRICTED = {
['bedroom'] = {
['any'] = {{'blind - open', 'bedroom'}}
},
['study'] = {
['any'] = {{'blind - open', 'study'}}
},
},
['blind - close'] = {
['kitchen'] = {
......@@ -374,6 +451,54 @@ class.BASE_MODEL_RESTRICTED = {
['bedroom'] = {
['any'] = {{'blind - close', 'bedroom'}}
},
['study'] = {
['any'] = {{'blind - close', 'study'}}
},
},
['radio - on'] = {
['any'] = {
['any'] = {{'radio - on', 'bedroom'}}
}
},
['radio - off'] = {
['any'] = {
['any'] = {{'radio - off', 'bedroom'}}
}
},
['tts - time'] = {
['kitchen'] = {
['any'] = {{'tts - time', 'kitchen'}},
},
['bedroom'] = {
['any'] = {{'tts - time', 'bedroom'}},
},
['study'] = {
['any'] = {{'tts - time', 'study'}},
},
},
['tts - temperature'] = {
['kitchen'] = {
['any'] = {{'tts - temperature', 'kitchen'}},
},
['bedroom'] = {
['any'] = {{'tts - temperature', 'bedroom'}},
},
['study'] = {
['any'] = {{'tts - temperature', 'study'}},
},
},
['phone - help'] = {
['any'] = {
['any'] = {{'phone - help', 'study'}},
}
},
['phone - son'] = {
['any'] = {
['any'] = {{'phone - son', 'study'}},
}
},
}
class.SENSORS_RESTRICTED = class.SENSORS_GLOBAL
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment