sinricpro / python-sdk

python3 sdk for sinric pro.
https://sinric.pro
23 stars 9 forks source link

Actions as class methods #54

Open thegoliathgeek opened 1 year ago

thegoliathgeek commented 1 year ago

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()
kakopappa commented 1 year ago

Hi @thegoliathgeek are you working on this?

thegoliathgeek commented 1 year ago

@kakopappa Yes, maybe this weekend . It can be tested

thegoliathgeek commented 1 year ago

Hey I am working on this. It requires full reconfiguration Might take some more time.

kakopappa commented 1 year ago

Great. Thanks for the heads up

On Sun, 27 Aug 2023 at 5:10 PM Dhanush @.***> wrote:

Hey I am working on this. It requires full reconfiguration Might take some more time.

— Reply to this email directly, view it on GitHub https://github.com/sinricpro/python-sdk/issues/54#issuecomment-1694626502, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZAZZQVWIHZ32KUJIXSF4LXXMMHVANCNFSM6AAAAAAZXL4YZA . You are receiving this because you were mentioned.Message ID: @.***>