Skip to content

Actions as class methods #54

Open
Open
@thegoliathgeek

Description

@thegoliathgeek

something like shown below

class SinricProSwitch {
	
}

class SinricPro {

}

def on_power_state(state) {
 return true, newState
}

sinricpro_switch = SinricProSwitch("deviceId");
sinricpro_switch.on_power_state(on_power_state)

sinricpro = SinricPro();
sinricpro.add_device(sinricProSwitch);
sinricpro.start()

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions