Skip to content

Instantly share code, notes, and snippets.

@ricehornet
Last active November 24, 2020 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ricehornet/d636ef266d35dc27086a945d1a7e1dc0 to your computer and use it in GitHub Desktop.
Save ricehornet/d636ef266d35dc27086a945d1a7e1dc0 to your computer and use it in GitHub Desktop.
PAYG Credit Resource
PAYG Credit Resource
Disconnected*
reset or init -> link state?
link or unlink event -> link state?
Leading
reset -> Disconnected
link or unlink event -> link state?
Following
reset -> Disconnected
link or unlink event -> link state?
Relaying
reset -> Disconnected
link or unlink event -> link state?
link state?
no links -> Disconnected
linked to accessories only -> Leading
linked to controller only -> Following
linked to accessories and controller -> Relaying
function render(model){
let current_state_name = model.active_states[0].name;
return $("h1",
{style: {color: "darkBlue"}},
`The current state is: ${current_state_name}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment