Closed mcsSolutions closed 4 years ago
I can't reproduce this problem, I added a trigger that can be a condition to the sample plugin see SampleTriggerAndConditionType.cs in this branch: https://github.com/spudwebb/Sample-Plugin-CS/tree/triggers
and when I create a AND IF in the event engine I can only select the "Sample Trigger And Condition", and not the "Sample Trigger"
I did confirm that there is a difference is when using AND IF, but not when using OR IF. In retrospect it makes sense OR IF is a trigger and not a condition so the issue can be closed. The new sample trigger and condition project does run with errors in the console.
I don't see this error on my system Make sure you you don't use an old PluginSdk.dll to run the plugin, because it looks like a bug that was fixed since PluginSdk version 1.0.8.1 : https://github.com/HomeSeer/Plugin-SDK/commit/1b9d77ee43cc5dabd48f515c9730ef8569ecc316
HS4 4.1.7.0 Plugin (mcsMQTT) contains three types of triggers. In one of the three the following was added: Public Overrides ReadOnly Property CanBeCondition As Boolean Get Return True End Get End Property This enabled this trigger type to show in the AND IF / OR IF event trigger options. The other two trigger types supported by the plugin also show in the menu of AND IF / OR IF options. Since CanBeConditioin was not overridden in these other two they should not exist in the event AND IF / OR IF selector.