This commit is contained in:
Erimus MBA 2020-01-12 20:17:53 +08:00
parent 14f063db3b
commit b00c63c340
5 changed files with 27 additions and 9 deletions

View File

@ -61,7 +61,10 @@
event: leave
platform: zone
zone: zone.home
condition: []
condition: # 防止iCloud偶尔抽风误触 加一个ping判断
condition: state
entity_id: device_tracker.pingiphonexr
state: 'not_home'
action:
- service: switch.turn_off
entity_id:

View File

@ -11,7 +11,7 @@ theater: # 前端有用到
icon: mdi:movie-open
entities:
- switch.theater_mode
- switch.amplifier_power
# - switch.amplifier_power
- switch.projector_power
- switch.screen
- switch.screen_pause

View File

@ -1,4 +1,13 @@
{
"build_systems":
[
{
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"name": "Anaconda Python Builder",
"selector": "source.python",
"shell_cmd": "\"python3\" -u \"$file\""
}
],
"folders":
[
{

View File

@ -85,6 +85,8 @@ HA 说是入门比较简单,但其实许多教程都说得比较含糊笼统
- **博联/欧瑞博/米家/易微联** 类似这些,是几家大的智能硬件供应商。选购他们的设备前,务必确认一下是否能接入 HA。比如有些天猫精灵定制版要接入就很麻烦新人的话非常不推荐了。现在各家都在圈地大都硬件厂商做的 App 都比较粗糙。
- 另外**天猫精灵/米家**,还有京东好像也有一个,都是类似 HA 的服务平台,试图成为统一的硬件管理入口。
- **[ZigBee](https://zh.wikipedia.org/wiki/ZigBee)** 一种物联网协议。
## 教程正文
@ -333,3 +335,8 @@ HA 说是入门比较简单,但其实许多教程都说得比较含糊笼统
- **硬件隔离**
比如需要使用网络摄像头的,可以考虑加装一个智能插座。然后通过自动化,在你在家的时候,自动把摄像头移向死角,并切断摄像头插座的电源。从硬件上杜绝被偷拍的可能。
# 附录
- [Integrations - Home Assistant](https://www.home-assistant.io/integrations/) 所有可以整合的设备服务一览
- [Home Assistant Demo](https://demo.home-assistant.io/#/lovelace/0) Lovelace 的示范页面

View File

@ -94,7 +94,7 @@ theater_mode_on:
entity_id: switch.projector_power
- service: switch.turn_on
entity_id: switch.projector_power
- delay: 00:00:10
- delay: 00:00:15
# 关灯
- service: switch.turn_off
entity_id: group.light
@ -105,6 +105,11 @@ theater_mode_off:
# 状态记录器
- service: input_boolean.turn_off
entity_id: input_boolean.theater_mode
# 开灯 天亮的话就不开
- service: switch.turn_on
data_template:
entity_id: >
switch.light{% if is_state('sun.sun','below_horizon') %}_2_smart{% endif %}
# 收起幕布 不灵敏多按几次
- service: switch.turn_off
entity_id: switch.screen
@ -116,7 +121,6 @@ theater_mode_off:
entity_id: switch.screen
- service: switch.turn_off
entity_id: switch.screen
- delay: 00:00:01
# 关闭投影仪 为了保险多按几次
- service: switch.turn_off
entity_id: switch.projector_power
@ -132,8 +136,3 @@ theater_mode_off:
- delay: 00:00:03
- service: switch.turn_off
entity_id: switch.projector_power
# 开灯 天亮的话就不开
- service: switch.turn_on
data_template:
entity_id: >
switch.light{% if is_state('sun.sun','below_horizon') %}_2_smart{% endif %}