IndigoDomotics / indigo-ecobee-plugin

Plugin for Indigo home automation software to support Ecobee thermostats and remote sensors
1 stars 1 forks source link

Plugin assumes exactly one remote sensor per thermostat #6

Closed FlyingDiver closed 5 years ago

FlyingDiver commented 5 years ago

ecobee_devices.py:179

        # should be exactly one; if not, we should panic
        matchedSensor = [
            rs for rs in thermostat['remoteSensors']
            if 'thermostat' == rs.get('type')
        ][0]

This is wrong. There can be 0 to 32 remote sensors for thermostat:

https://support.ecobee.com/hc/en-us/articles/115006028567-How-many-wireless-remote-sensors-can-you-support-on-the-thermostat-

FlyingDiver commented 5 years ago

Hmm. Maybe not. Maybe this is looking it up the other direction (from RS to Thermostat).

FlyingDiver commented 5 years ago

Ah. It retrieves the sensor that's built into the thermostat.