读取并更改松下舒适云设备的状态

pcomfortcloud的Python项目详细描述


python松下舒适云

一个python模块,用于通过松下舒适云应用程序api读取和更改松下气候设备的状态

命令行用法

usage: pcomfortcloud.py [-h] [-t TOKEN] username password {list,get,set} ...

Read or change status of Panasonic Climate devices

positional arguments:
  username              Username for Panasonic Comfort Cloud
  password              Password for Panasonic Comfort Cloud
  {list,get,set,dump}   commands
    list                Get a list of all devices
    get                 Get status of a device
    set                 Set status of a device
    dump                Dump raw data of a device

optional arguments:
  -h, --help            show this help message and exit
  -t TOKEN, --token TOKEN
                        File to store token in
  -s [BOOL], --skipVerify [BOOL]
                        Skip Ssl verification
  -r [BOOL], --raw [BOOL]
                        Raw dump of response
usage: pcomfortcloud.py username password get [-h] device

positional arguments:
  device      device number

optional arguments:
  -h, --help  show this help message and exit
usage: pcomfortcloud.py username password set [-h]
                                             [-p, --power {On,Off}]
                                             [-t, --temperature TEMPERATURE]
                                             [-s, --fanspeed {Auto,Low,LowMid,Mid,HighMid,High}]
                                             [-m, --mode {Auto,Cool,Dry,Heat,Fan}]
                                             [-e, --eco {Auto,Quiet,Powerful}]
                                             [-y, --airswingvertical {Auto,Down,DownMid,Mid,UpMid,Up}]
                                             [-x, --airswinghorizontal {Auto,Left,LeftMid,Mid,RightMid,Right}]
                                             device

positional arguments:
  device                Device number

optional arguments:
  -h, --help
                        show this help message and exit
  -p, --power {On,Off}
                        Power mode
  -t, --temperature TEMPERATURE
                        Temperature in decimal format
  -s, --fanspeed {Auto,Low,LowMid,Mid,HighMid,High}
                        Fan speed
  -m, --mode {Auto,Cool,Dry,Heat,Fan}
                        Operation mode
  -e, --eco {Auto,Quiet,Powerful}
                        Eco mode
  -y, --airswingvertical {Auto,Down,DownMid,Mid,UpMid,Up}
                        Vertical position of the air swing
  -x, --airswinghorizontal {Auto,Left,LeftMid,Mid,RightMid,Right}
                        Horizontal position of the air swing

模块使用

importpcomfortcloudsession=pcomfortcloud.Session('user@example.com','mypassword')session.login()devices=session.get_devices()print(devices)print(session.get_device(devices[0]['id']))session.set_device(devices[0]['id'],power=pcomfortcloud.constants.Power.On,temperature=22.0)

PYPI包

可在https://pypi.org/project/pcomfortcloud/

如何发布包;

  • python .\setup.py sdist bdist_wheel
  • python -m twine upload dist/*

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
爪哇太阳报。安全验证器。ValidatorException:PKIX路径生成失败   java理解为什么在onDispatchTouchEvent()返回True后仍调用onClick()   java如何在资源包中使用JSF标记/如何在资源包中重写URL?   java什么是流控制异常的替代方案?   java使用Spring数据JPA/MongoDB交叉存储,一个查询可以跨越两个数据库吗?   Apache Sling/felix中的java OSGi slf4j日志记录   为什么当我们想要水平/垂直旋转矩阵时,我们要把这个项除以2?   尝试从外部网页接收JSON字符串时出现安卓 Java NullPointerException   java执行异常:从Callable调用方法时   java在jetty上以调试模式运行webapp,使用maven jetty插件在intellij中构建成功(应用程序应在调试模式下启动)   带有内存数据库的linux Java应用程序的构建时间太长   基于java的随机数单元测试算法   java类型javax。摆动JComponent无法解析   Google日历API和UI小部件Java   java tomcat没有突然和任意地响应   java无法使用jsoup在html中获取图像src   我无法让Java接受键盘输入字符串   java如何开始使用Bambol而不让部署永远继续?   java如何使用另一个类的actionPerformed方法删除一个类/组件中的按钮?   java JSON反序列化brakets{}中的一系列对象