VOLTTRON / volttron

VOLTTRON Distributed Control System Platform
https://volttron.readthedocs.io/
Other
452 stars 217 forks source link

Home Assistant Driver #3089

Closed riley206 closed 8 months ago

riley206 commented 1 year ago

Description

This is a pull request to add the Home Assistant Driver to the VOLTTRON repository.

Type of change

How Has This Been Tested?

This has been tested by running the driver on the same network as our Home Assistant instance with real devices such as thermostats and lights connected to Home Assistant.

Checklist:

craig8 commented 1 year ago

This should be against the develop branch not main. @riley206 you can modify the branch by changing the branch at the top of the pr and clicking edit.

schandrika commented 9 months ago

@riley206 Update documentation to rst and move it to docs under docs/source/agent-framework/driver-framework/home_assistant directory and also make sure there is a link to this document from docs/source/agent-framework/driver-framework/drivers-overview.rst

Also other documentation updates that would be useful:

Mention how to see the list of devices - i.e. specify device = entity and home assistant prefixes thermostats with climate. and light with light. Mention any limitations - i.e. this driver can scrape data from all devices but can only control light and thermostat

schandrika commented 9 months ago

@riley206 Could you make errors to raise exceptions instead of suppressing it with just _log.error. Warnings are okay to just log, but when there are actual errors such as writing to a read-only point or writing a wrong value the error should get propagated to the calling agent/user. So raise the exception or custom IOError or ValueError in addition to _log.error