You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is a scenario that must execute a command every hour
Every test to create a scenario with this device command parameters "message" and "type" fail with this error:
2017-08-13 22:58:26,351 domogik-scenario INFO Create or save scenario : name = '0', id = '0',json = '
{
"type":"controls_if",
"id":"CXeRaH*|O;%(XRY0~0(d",
"IF0":{
"type":"cron.CronTest",
"id":"^e/Y2^OEHB4-GR-PyWMY",
"cron.cron":"@hourly"
},
"DO0":{ ==> Missing '"type":"command.CommandAction.xx",'
"type":{ ==> "type" is the name of parameter !
"type":"text",
"id":"(8T/!_O|}/yyKIyyLewm",
"TEXT":"param2"
},
"id":"-33H2E]a,`=lSMgCxr$D",
"message":{
"type":"text",
"id":"2,jU:d5nA[7k=qf[/.2t",
"TEXT":"param1"
}
}
}'
2017-08-13 22:58:26,507 domogik-scenario.Test 6 DEBUG Create test instance cron.CronTest with uuid ecffb34a-f607-44ed-84dd-ab045f1a8014
2017-08-13 22:58:26,508 domogik-scenario.Test 6 DEBUG Trigger <bound method ScenarioInstance.generic_trigger of <domogik.scenario.scenario.ScenarioInstance instance at 0x7ff89c32f5f0>> called by parameter <domogik.scenario.parameters.cron.CronParameter instance at 0x7ff89c2e4710>
2017-08-13 22:58:26,509 domogik-scenario.Test 6 DEBUG Eval the condition!
2017-08-13 22:58:26,540 domogik-scenario ERROR Creation of a scenario failed. Error is : Traceback (most recent call last):
File "/opt/dmg/domogik.github/src/domogik/scenario/manager.py", line 235, in create_scenario
scen = ScenarioInstance(self.log, cid, name, payload, dis, state, self._db)
File "/opt/dmg/domogik.github/src/domogik/scenario/scenario.py", line 132, in __init__
self._instanciate()
File "/opt/dmg/domogik.github/src/domogik/scenario/scenario.py", line 187, in _instanciate
self._parsed_condition = self.__parse_part(self._json)
File "/opt/dmg/domogik.github/src/domogik/scenario/scenario.py", line 276, in __parse_part
dop = self.__parse_part(part["DO{0}".format(num)], (level+incLev), debug, True)
File "/opt/dmg/domogik.github/src/domogik/scenario/scenario.py", line 243, in __parse_part
if part['type'][0:3] == 'DT_':
TypeError: unhashable type
The "type" name of the parameter generates an error when formatting the scenario json.
The scenario is incomplete, the field "type":"command.CommandAction.xx", is missing in json.
If I replace the parameter name by another, There is no longer the issue.
Same issue on 0.5.3.and 0.6
The text was updated successfully, but these errors were encountered:
Here is a scenario that must execute a command every hour
Every test to create a scenario with this device command parameters "message" and "type" fail with this error:
The "type" name of the parameter generates an error when formatting the scenario json.
The scenario is incomplete, the field "type":"command.CommandAction.xx", is missing in json.
If I replace the parameter name by another, There is no longer the issue.
Same issue on 0.5.3.and 0.6
The text was updated successfully, but these errors were encountered: