Bug fixes

- fix bug where the device would never turn on
- Fix bug where dictionary object was created for state (instead of the
  raw object that was intended)