Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thermostat Room Sensors #94

Closed
jamespet77 opened this issue Oct 10, 2022 · 8 comments · Fixed by #100
Closed

Thermostat Room Sensors #94

jamespet77 opened this issue Oct 10, 2022 · 8 comments · Fixed by #100
Assignees

Comments

@jamespet77
Copy link

Is is possible to get the data from the thermostat room sensors?

@shauntarves
Copy link
Owner

Hey @jamespet77, thanks for the question. I would love to add support for these! I didn't even know they existed until now.

So, what typically will happen with something like this is that I would need you to share the devices with me (temporarily) via the app. There is at least one open bug for the thermostat, so if you could share the sensor(s) and the thermostat, I can add support for this. My email for the Wyze account is shaun tarves net

@jamespet77
Copy link
Author

I can do that.
just to confirm its shaun at tarves dot net

@shauntarves
Copy link
Owner

shauntarves commented Oct 10, 2022 via email

@jamespet77
Copy link
Author

Sent. It has one room sensor linked. I have another room sensor if you need multiple.

@shauntarves shauntarves self-assigned this Nov 2, 2022
@shauntarves
Copy link
Owner

@jamespet77 I've just pushed initial support for reading room sensor data to branch 94-thermostat-room-sensors

You can get a list of sensors connected to a thermostat by issuing:

sensors = client.thermostats.get_sensors(device_mac=<device_id>, device_model='CO_EA1')

The sensor object looks like this:

for _sensor in sensors:
    print(f"    id: {_sensor.did}")
    print(f"        name: {_sensor.nickname}")
    print(f"        temperature: {_sensor.temperature}")
    print(f"        humidity: {_sensor.humidity}")
    print(f"        battery: {_sensor.battery}")
    print(f"        state: {_sensor.state}")
    print(f"        status: {_sensor.status}")
    print(f"        auto_comfort_mode: {_sensor.auto_comfort_mode}")
    print(f"        comfort_balance_weight: {_sensor.comfort_balance_weight}")
    print(f"        temperature_threshold: {_sensor.temperature_threshold}")

id: CO_TH1_XXXX
        name: Kitchen
        temperature: 73.86
        humidity: 33
        battery: RoomSensorBatteryLevel.LEVEL_3
        state: RoomSensorStateType.ONLINE
        status: RoomSensorStatusType.MANUAL_UP
        auto_comfort_mode: ThermostatSensorTemplate.HOME_SLEEP
        comfort_balance_weight: ThermostatSensorComfortBalanceMode.BALANCE
        temperature_threshold: 5

@jamespet77
Copy link
Author

Thanks Shaun!! big help. Wyze needsto put you on the team.

@shauntarves
Copy link
Owner

shauntarves commented Nov 2, 2022 via email

@jamespet77
Copy link
Author

It is working. I might suggest returning an empty list instead of None if there are no room sensors? Either way. It's working. I can get what I need now.

@shauntarves shauntarves linked a pull request Nov 3, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants