title: '0.47: Python 脚本, Sesame Smart 门锁, Gitter, Onvif 摄像头' description: '<a href=''/home-assistant/integrations/版本/0.47''<img src=''/home-assistant/images/blog/2017-06-0.47/components.png'' style=''border: 0;box-shadow: none;''</a。' 已经突破 700 个集成!
0.47: Python 脚本, Sesame Smart 门锁, Gitter, Onvif 摄像头
这次发布带来了海量新内容!谁会不喜欢新东西呢?在这个版本中,Home Assistant 的集成数量突破了 700 个。截至今天,我们已经 1369 天大了,这意味着大约每两天就会新增一个集成!
Python 脚本
The biggest change is a new type of 脚本 component: Python 脚本. This new component will allow you to write 脚本 to manipulate Home Assistant: call 服务, set 状态 and fire events. Each Python 脚本 is made available as a 服务. Head over to the docs to see how to get started.
更新检查器
更新检查器新增了一个主动选择加入的选项,让我们了解你正在使用哪些组件。这样我们就能把开发精力更集中地投入到受欢迎的组件上。
顺便提醒一下,我们绝不会以可识别个人身份的方式分享收集到的数据。不过我们计划很快公开汇总数据,其中会包括总用户数量,以及大家运行 Home Assistant 所使用的硬件/软件平台。
Z-Wave
Z-Wave is also getting a big 更新 in this 发布. The confusing entity_ids will be on their way out. There is a zwave 博客 post that gives more detail, but the 升级 steps will be as follows:
- Run Home Assistant as normal and the old IDs will still be used.
- The new 实体 IDs will be shown in the more-info dialog for each 实体. Check to make sure none of them will have conflicts once the new names are applied.
- Rename 实体 using the ui 卡片 as described in the 博客 post to avoid conflicts. 重启 Home Assistant to observe the changes.
- 更新 all places mentioning IDs (groups, 自动化, customization, etc.) in 配置.yaml.
- Add
new_entity_ids: trueto your zwave config. - 重启 Home Assistant to run with new IDs.
- The old 实体 IDs will be available in the more info dialog to trace down any remaining 错误.
Python 3.6 猴子补丁
一些人发现,在 Python 3.6 下运行 Home Assistant 可能会导致段错误。这似乎与我们发布基于 asyncio 的核心时遇到的早期段错误问题有关。我们原以为这些问题会在 Python bug 26617 修复后消失。虽然与旧问题相比,相关报告已经少了很多,但仍然有用户遇到这个问题(gdb 堆栈跟踪指向 PyObject_GC_Del())。
从 Python 3.6 开始,Task 和 Future 类被迁移到了 C 实现。这确实带来了不错的性能提升,但也让我们无法再通过 monkey patch Task 类来规避段错误。Ben Bangert 想出了另一个 monkey patch,阻止 Python 3.6 使用 C 类,转而回退到 Python 版本。这样我们就能再次应用原先的 monkey patch。
从 0.47 版本开始,这两个 monkey patch 会默认启用,以避免用户遭遇段错误。代价是无法享受 Python 3.6 引入的全部优化。
如果你想在不启用 monkey patch 的情况下运行 Home Assistant,可以使用 HASS_NO_MONKEY=1 hass 启动。我们会继续调查这个问题,并尝试在未来的 Python 版本中彻底修复它。
发布 0.47.1 - June 21
- Fix Vera 灯光 issue #8098 (@tsvi - #8101) (灯光.vera docs)
- Fix Dyson async_add_job (@CharlesBlonde - #8113) (风扇.dyson docs) (传感器.dyson docs)
- 更新 InfluxDB to handle datetime objects and multiple decimal points (@philhawthorne - #8080) (influxdb docs)
- Fixed iTach command parsing with empty data (@alanfischer - #8104) (遥控器.itach docs)
- Allow iteration in python_script (@balloob - #8134) (python_script docs)
新平台
- Added a Taps Aff 二元sensor (@bazwilliams - #7880) (binary_sensor.tapsaff docs) (new-platform)
- 门锁.sesame: New 门锁 platform for Sesame smart 门锁 (@trisk - #7873) (门锁.sesame docs) (new-platform)
- Etherscan.io 传感器 (@nkgilley - #7855) (传感器.etherscan docs) (new-platform)
- blockchain.info 传感器 (@nkgilley - #7856) (传感器.blockchain docs) (new-platform)
- Add Radarr 传感器 (@tboyce021 - #7318) (传感器.radarr docs) (new-platform)
- Added buienradar 传感器 and 天气 (@mjj4791 - #7592) (传感器.buienradar docs) (天气.buienradar docs) (new-platform)
- Add support for Vanderbilt SPC 报警 面板 and attached 传感器 (@mbrrg - #7663) (spc docs) (alarm_control_panel.spc docs) (binary_sensor.spc docs) (new-platform)
- Add raspihats 开关 (@florincosta - #7665) (开关.raspihats docs) (new-platform)
- Add juicenet platform (@jesserockz - #7668) (juicenet docs) (传感器.juicenet docs) (new-platform)
- add ripple 传感器 (@nkgilley - #7935) (传感器.ripple docs) (new-platform)
- New component: Python 脚本 (@balloob - #7950) (python_script docs) (new-platform)
- Nadtcp component (@mwsluis - #7955) (媒体播放器.nadtcp docs) (new-platform)
- Add Gitter.im 传感器 (@fabaff - #7998) (传感器.gitter docs) (new-platform)
- 更新 mailgun (@happyleavesaoc - #7984) (mailgun docs) (通知.mailgun docs) (breaking change) (new-platform)
- Add Flexit AC 温控 platform (@Sabesto - #7871) (温控.flexit docs) (new-platform)
如果你需要帮助……
欢迎使用我们非常活跃的 论坛,或加入 聊天频道 与我们交流。虽然发布说明也开放评论,但我们更推荐使用前面的沟通渠道。谢谢。
反馈问题
如果你遇到了这个版本引入的问题,请前往我们的 issue tracker 提交反馈,并确保填写 issue 模板中的所有字段。
不向后兼容的变更
- 更新 opencv config to match other 图像 processors (@Teagan42 - #7864) (image_processing.opencv docs) (breaking change)
- Lutron: Add 配置 check and use default var names (@fabaff - #7963) (lutron docs) (灯光.lutron docs) (breaking change)
- Convert mailgun to component (@happyleavesaoc - #7984) (mailgun docs) (通知.mailgun docs) (breaking change) (new-platform)
- Z-Wave node and 场景 activated 触发器 events now use the full 实体 ID (@armills - #7786) (zwave docs) (breaking change)
- LIFX: add multiple modes to pulse effect. The
lifx_effect_breathecall has been deprecated. Uselifx_effect_pulsewith the newmode: breathe属性 instead. (@amelchio - #8016) (灯光.lifx docs) (breaking change) - Use standard entity_ids for zwave 实体. This also introduces a small API breakage, where
EVENT_SCENE_ACTIVATEDandEVENT_NODE_EVENTwill no longer supply anobject_id. They will now be tied to the node entity_id. (@armills - #7786) (zwave docs) (灯光.zwave docs) (breaking change) - Fix 属性 实体. Home Assistant will no longer filter out 实体 that are 'falsey'. So you might see more 实体 属性 show up. (@pvizeli - #8066) (breaking change)
全部变更
- 更新 squeezebox.py (@molobrakos - #7617) (媒体播放器.squeezebox docs)
- Fix html5 unsub (@balloob - #7874) (通知.html5 docs)
- Added effects to Yeelight bulbs (@Mister-Espria - #7152) (灯光.yeelight docs)
- Enocean 二元sensor: Handle click of both rockers (@twendt - #7770) (binary_sensor.enocean docs)
- Support for renaming ZWave values (@armills - #7780) (zwave docs)
- Fix telegram_bot (@balloob - #7877) (telegram_bot.polling docs) (telegram_bot.webhooks docs)
- [灯光.lifx] 更新 aiolifx (@amelchio - #7882) (灯光.lifx docs)
- Change nad_receiver to pypi (@joopert - #7852) (媒体播放器.nad docs)
- 开关 pymyq to pypi (@andrey-git - #7884) (遮盖.myq docs)
- Use constants (@fabaff - #7888) (通知.xmpp docs)
- 升级 pyasn1-modules to 0.0.9 (@fabaff - #7887) (通知.xmpp docs)
- 升级 sendgrid to 4.2.0 (@fabaff - #7886) (通知.sendgrid docs)
- 升级 python-telegram-bot to 6.0.3 (@fabaff - #7885)
- Fix MQTT 摄像头 test (@balloob - #7878)
- Added a Taps Aff 二元sensor (@bazwilliams - #7880) (binary_sensor.tapsaff docs) (new-platform)
- 门锁.sesame: New 门锁 platform for Sesame smart 门锁 (@trisk - #7873) (门锁.sesame docs) (new-platform)
- Dsmr5 revert (@aequitas - #7900) (传感器.dsmr docs)
- Fix typos in Wunderground component (Percipitation -> Precipitation) (@mje-nz - #7901) (传感器.wunderground docs)
- Add support for the expirationTime parameter. (@perosb - #7895) (通知.html5 docs)
- Etherscan.io 传感器 (@nkgilley - #7855) (传感器.etherscan docs) (new-platform)
- blockchain.info 传感器 (@nkgilley - #7856) (传感器.blockchain docs) (new-platform)
- MQTT 遮盖 modifications (@cribbstechnologies - #7841) (遮盖.MQTT docs)
- Add Radarr 传感器 (@tboyce021 - #7318) (传感器.radarr docs) (new-platform)
- Add 服务 to set nest away/home modes (@mattsch - #7619) (nest docs)
- Added buienradar 传感器 and 天气 (@mjj4791 - #7592) (传感器.buienradar docs) (天气.buienradar docs) (new-platform)
- Add support for Vanderbilt SPC 报警 面板 and attached 传感器 (@mbrrg - #7663) (spc docs) (alarm_control_panel.spc docs) (binary_sensor.spc docs) (new-platform)
- Add raspihats 开关 (@florincosta - #7665) (开关.raspihats docs) (new-platform)
- Add 'icon_template' to 开关 模板 (similar to 传感器 模板) (@PhracturedBlue - #7862) (开关.模板 docs)
- Fix docstring (@fabaff - #7907)
- Sync crypto-currency platforms (@fabaff - #7906) (传感器.bitcoin docs) (传感器.blockchain docs) (传感器.coinmarketcap docs) (传感器.etherscan docs)
- Move consts to 'const.py' (@fabaff - #7909) (媒体播放器.sonos docs) (传感器.imap_email_content docs) (传感器.pvoutput docs) (传感器.waqi docs)
- Minor cleanup - Define 'CONF_ICON_TEMPLATE' constant centrally (@PhracturedBlue - #7910) (传感器.模板 docs) (开关.模板 docs)
- Do not call 更新() in constructor (@fabaff - #7912) (传感器.cpuspeed docs) (传感器.cups docs) (传感器.currencylayer docs) (传感器.fixer docs)
- Add juicenet platform (@jesserockz - #7668) (juicenet docs) (传感器.juicenet docs) (new-platform)
- Bump pyEight 版本 to fix 0hr session 错误 (@mezz64 - #7916) (eight_sleep docs)
- 更新 to pywebpush 1.0.4 which allows 安装 on system with openssl-1.1.0 (cryptography dep) (@perosb - #7915) (通知.html5 docs)
- Do not call 更新() in constructor (@fabaff - #7917) (传感器.dte_energy_bridge docs) (传感器.dublin_bus_transport docs) (传感器.dweet docs) (传感器.ebox docs) (传感器.ecobee docs) (传感器.hddtemp docs) (传感器.mold_indicator docs) (传感器.pi_hole docs) (传感器.yahoo_finance docs)
- Fix changes introduced with #7917 (@fabaff - #7930) (传感器.waqi docs)
- Do not call 更新() in constructor (@fabaff - #7931)
- Add service_url config option to volvooncall (@palp - #7919) (volvooncall docs)
- Added 'change' field to statistics 传感器 (@jminn - #7820) (传感器.statistics docs)
- add ripple 传感器 (@nkgilley - #7935) (传感器.ripple docs) (new-platform)
- Add Yahoo! 天气 platform (@fabaff - #7939)
- [媒体播放器.sonos] Send media_stop on turn_off (@Juggels - #7940) (媒体播放器.sonos docs)
- 更新 to 006 (@joopert - #7945) (媒体播放器.nad docs)
- 更新 ping.py (@vrs01 - #7944) (device_tracker.ping docs)
- Add option to display all input sources / Add support for favourite channels / Treat Marantz SR5008 as Denon AVR-X 设备 (@scarface-4711 - #7949) (媒体播放器.denonavr docs)
- [WIP] Fix opencv (@Teagan42 - #7864) (image_processing.opencv docs) (breaking change)
- 升级 coinmarketcap to 3.0.1 (@fabaff - #7951) (传感器.coinmarketcap docs)
- test connection without needing admin rights (@heinemml - #7947)
- Fix the negative values bug in history_stats (@bokub - #7934)
- Vera colored 灯光 support (@alanfischer - #7942) (vera docs) (灯光.vera docs)
- Fix typos (@fabaff - #7957) (http docs) (风扇.zwave docs)
- Osram lightify, removed double set to the lightify bridge in case of brightness changes (@commento - #7662) (灯光.osramlightify docs)
- Add 配置 check and use default var names (@fabaff - #7963) (lutron docs) (灯光.lutron docs) (breaking change)
- 门锁.sesame: 更新 pysesame, add 状态 属性 (@trisk - #7953) (门锁.sesame docs)
- Fixed metadata issue (@bazwilliams - #7932) (媒体播放器.openhome docs)
- Create metoffice.py (@cyberjacob - #7965) (metoffice docs)
- Prevent Roku doing I/O in event loop (@balloob - #7969) (媒体播放器.roku docs)
- Fix platforms being able to block startup (@balloob - #7970)
- New component: Python 脚本 (@balloob - #7950) (python_script docs) (new-platform)
- Nadtcp component (@mwsluis - #7955) (媒体播放器.nadtcp docs) (new-platform)
- HomeMatic optimizations and code cleanup (@danielperna84 - #7986) (homematic docs) (binary_sensor.homematic docs) (遮盖.homematic docs) (传感器.homematic docs) (开关.homematic docs)
- 更新 eliqonline.py (@molobrakos - #7977) (传感器.eliqonline docs)
- test that all 灯光 关闭 when no 实体 id is given (@chilicheech - #7981)
- make
last_namefield optional (@azogue - #7988) - Bugfixing with 版本 0.4.4 of denonavr (@scarface-4711 - #7995) (媒体播放器.denonavr docs)
- 升级 py-cpuinfo to 3.3.0 (@fabaff - #7992) (传感器.cpuspeed docs)
- LIFX: clean up internal color conversions (@amelchio - #7964) (灯光.lifx docs)
- LIFX: add support for setting infrared level (@amelchio - #8000) (灯光.lifx docs)
- dismiss 服务 for persistent 通知 (@tedstriker - #7996) (persistent_notification docs)
- Add Gitter.im 传感器 (@fabaff - #7998) (传感器.gitter docs) (new-platform)
- Fixing Client connection 错误 (@sander76 - #7991) (telegram_bot.polling docs)
- Additional demo 风扇 with only speed support (@armills - #7985)
- 更新 mailgun (@happyleavesaoc - #7984) (mailgun docs) (通知.mailgun docs) (breaking change) (new-platform)
- Fixed bug in spotify component. (@soldag - #7976) (媒体播放器.spotify docs)
- fixing potential null issue with optional param being parsed as a 脚本 (@cribbstechnologies - #7928) (灯光.模板 docs)
- Make it more flexible (fixes #7954) (@fabaff - #8001) (image_processing.seven_segments docs)
- Add Flexit AC 温控 platform (@Sabesto - #7871) (温控.flexit docs) (new-platform)
- 更新 pyripple (@nkgilley - #8015) (传感器.ripple docs)
- Allow put as method (@fabaff - #8004) (开关.rest docs)
- 配置 conversation for custom 动作 with keywords (@mjsir911 - #7734) (conversation docs)
- Remove globally disabled pylint issues (@fabaff - #8005) (vera docs) (日历.google docs) (温控.wink docs) (device_tracker.owntracks docs) (媒体播放器.aquostv docs) (媒体播放器.plex docs) (传感器.openevse docs)
- entity_id for 服务 风扇.turn_off is optional (@chilicheech - #7982)
- Make percentage string values as floats/ints in InfluxDB (@philhawthorne - #7879) (influxdb docs)
- Take in account Spotify account permissions (@Tommatheussen - #8012) (媒体播放器.spotify docs)
- Add Dyson Pure Cool Link support (@CharlesBlonde - #7795)
- Allow device_tracker platforms to specify picture and icon upon discovery (@andrey-git - #8018)
- Discover Z-Wave values by index (@armills - #7853) (zwave docs)
- LIFX: add multiple modes to pulse effect (@amelchio - #8016) (灯光.lifx docs) (breaking change)
- Do not call 更新() in constructor (@fabaff - #8048) (传感器.snmp docs)
- 升级 pysnmp to 4.3.8 (@fabaff - #8044) (device_tracker.snmp docs) (传感器.snmp docs)
- 升级 zeroconf to 0.19.1 (@fabaff - #8043) (zeroconf docs)
- Vera fix for dimmable vs rgb 灯光 (@alanfischer - #8007) (vera docs) (灯光.vera docs)
- Group 服务 / dynamic handling (@pvizeli - #7971) (group docs)
- Adding ssocr to Docker to support Seven Segments Display (@MartyTremblay - #8028)
- Added host variable to Splunk.py and updated tox tests (@boojew - #8052) (splunk docs)
- Restrict Python 脚本 (@balloob - #8053) (python_script docs)
- Fixed the Wind 传感器 following new 发布 of netatmo-api-python (@glpatcern - #8030) (netatmo docs) (传感器.netatmo docs)
- 媒体播放器.firetv - Adding support for https. (@coolcow - #8022) (媒体播放器.firetv docs)
- Added ONVIF 摄像头 component (@matt2005 - #7979)
- Provide entity_id to avoid 传感器 mixup (fixes #7636). Use async_dispatcher. Provide icon. (@molobrakos - #7946) (volvooncall docs)
- Updater improvements to send option component information (@infamy - #7720) (updater docs)
- Use standard entity_ids for zwave 实体 (@armills - #7786) (zwave docs) (灯光.zwave docs) (breaking change)
- 更新 numpy 1.13.0 (@pvizeli - #8059) (image_processing.opencv docs)
- No 更新 in MQTT 二元sensor #7478 (@pezinek - #8057)
- Always enable monkey patch (@balloob - #8054)
- Add to zwave 服务 descriptions (@andrey-git - #8072)
- Fix 属性 实体 (@pvizeli - #8066) (breaking change)
- Added 'all_plants' group and support for plant groups 状态. (@aronsky - #8063) (group docs) (plant docs)
- Fix EntityComponent handle 实体 without a name (@balloob - #8065)
- 更新 pyunifi component to use APIError passed from pyunifi 2.13. Better accommodate login failures with wrapper in pyunifi 2.13. (@finish06 - #7899) (device_tracker.unifi docs)
- bump usps 版本 (@happyleavesaoc - #8074)
- bump ups (@happyleavesaoc - #8075)


