与霍尼韦尔Lyric™恒温器对话的PythonAPI
python-lyric的Python项目详细描述
安装
使用pip
#从pypi安装包 $pip安装python lyric
从获取客户ID和客户机密 https://developer.honeywell.com
在脚本中使用:
导入歌词
- lapi=lyric.lyric(客户id=client,客户secret=client,
- 令牌缓存文件=令牌缓存文件, redirect_uri=redirect_uri,app_name=app_name)
- 在洛杉矶的位置。位置:
打印('id:s%location.id) print('name:%s'%location.name) print('city:%s'%location.city)
- 对于位置中的用户。用户:
- 打印('id:s%user.id) print('名称:%s%user.name) print('firstname:%s'%user.firstname) print('姓氏:%s%user.lastname)
- 用于设置恒温器。恒温器:
- 打印('id:s%atmostor.id) print('名称:%s%atmostor.name) 节温器温度设定点=20