Open avargaskun opened 2 years ago
There's public override bool CanBeCondition
and public override bool IsTriggerTrue(bool isCondition)
Thanks. These aren't the same as what I'm looking for. The way I understand, CanBeCondition
is to tell HS that my Trigger should also appear available as a condition (which is true
in my case) and IsTriggerTrue
is what HS calls to check for the status of the trigger.
What I need is a way to ask HS from my plug-in (in OnNewTrigger
as well as later on) if a particular instance of the trigger is configured as a trigger or as a condition. In HS3 that was passed in as a plug-in callback, but that doesn't seem to exist in HS4.
So, is bool isCondition
what you need?
This is a request that is in our TODO list as PSDK-111
https://github.com/HomeSeer/Plugin-SDK/issues/171 https://github.com/HomeSeer/Plugin-SDK/issues/237
Environment
HomeSeer
OS
Windows and Linux
HS Version
v4.2.12.0
Development
PSDK Version
v1.4.0.0
Language
C#
IDE
VSCode
Dev OS
Mac
Plugin
HSBuddy
Problem
The plugin has a trigger that supports being both a trigger and a condition. The trigger instance needs to know which kind it is to define the UI of the ConfigPage. In HS3, it was possible to do this by implementing
public void set_Condition(IPlugInAPI.strTrigActInfo TrigInfo, bool Value)
in theIPluginAPI
interface, but that is no longer available as part of theAbstractPlugin
class.Is there a way to obtain this information when a trigger is being created/modified in HS4 plugins?
Description
(See problem definition above)
Expected Behavior
A way to determine if a trigger instance is a trigger or a condition when being created/configured.
Steps to Reproduce
NA
Screenshots
NA
Logs
NA