Change virtual switch when I log in on my Mac?

I thought I read at one point on the forums that someone was tracking their state on their Mac so they could change the mode in smartThings. Unfortunately I can find it now. Has anyone done this? If so, any help getting it implemented would be greatly appreciated.