Difference between revisions of "HubAction Object"

From Hubitat Documentation
Jump to: navigation, search
(Created page with "==<code>Constructors</code>== Create a HubAction object. While protocol is optional, it is recommended that it be provided. If it is not specified the system will attempt t...")
 
(Replaced content with " <big>'''We're moving!''' Please visit http://docs2.hubitat.com for the latest documentation.</big> <big> This document is available at: http://docs2.hubitat.com/en/devel...")
(Tag: Replaced)
 
(22 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==<code>Constructors</code>==
 
  
Create a HubAction object. While protocol is optional, it is recommended that it be provided. If it is not specified the system will attempt to determine the protocol to use.
+
<big>'''We're moving!''' Please visit http://docs2.hubitat.com for the latest documentation.</big>
  
'''Signature:'''
+
<big>
HubAction()
+
This document is available at: http://docs2.hubitat.com/en/developer/hubaction-object
HubAction(String request)
+
</big>
HubAction(String request, Protocol protocol, String dni)
 
HubAction(String request, Protocol protocol, String dni, Map options)
 
HubAction(String request, Protocol protocol)
 
HubAction(String request, Protocol protocol, Map options)
 
HubAction(Map params)
 
HubAction(Map params, String dni)
 
HubAction(Map params, String dni, Map options)
 
 
 
'''Examples:'''
 
 
 
//Create and send a Z-Wave message
 
def hubAction = new hubitat.device.HubAction(new hubitat.zwave.commands.basicv1.BasicGet().format(), hubitat.device.Protocol.ZWAVE)
 
sendHubCommand(hubAction)
 
 
 
 
 
 
 
==<code>getAction</code>==
 
 
 
Can be used to get the request value of the HubAction.
 
 
 
'''Signature'''
 
String getAction()
 
 
 
==<code>getCallbackMethod</code>==
 
 
 
'''Signature:'''
 
String getCallbackMethod()
 
 
 
==<code>getURI</code>==
 
 
 
'''Signature:'''
 
URI getURI()
 

Latest revision as of 19:36, 25 September 2022

We're moving! Please visit http://docs2.hubitat.com for the latest documentation.

This document is available at: http://docs2.hubitat.com/en/developer/hubaction-object