Shelly switch state use rest api

Newbie here, but eager to learn. i have set up my 4 shelly 1 switches and can toggle them i’d like to base an automation on the switch state of one of my shellys, i currently am using rest so that i can also the cloud service untill i become more mqtt familiar.so how would a yaml look to return the switch state?

http://www.thesmarthomehookup.com/use-the-rest-component-to-add-a-shelly-switch-to-home-assistant/