The Ecobee API does not have an entry runtime.Occupancy, but you can address the ecobee3 thermostat itself as a remote sensor for the purpose of retrieving the temperature, humidity and occupancy at the thermostat. If your thermostat is named Dining Room:
The value returned from remoteSensors(Dining Room).capability(humidity).value should be the same as runtime.actualHumidity, but the value returned from remoteSensors(Dining Room).capability(temperature).value might differ from runtime.actualTemperature because the latter is an average of the temperatures across active sensors.
True ecobee3 remote sensors only return temperature and occupancy, but they may return UNDEF if the remote sensor is not recently reachable wirelessly from the thermostat. I’ve seen occupancy not report when there is trouble connecting with the thermostat.
OK. So I can’t see the humidity from the remote sensors… that’s no big deal. However, the occupancy is having issues.
The following code stops on the first switch. If I remark out the first switch, it stops on the second one. See the screenshot below to demonstrate this. I’m assuming there is an error somewhere.