渊澄

川流不息,渊澄取映

没错,最新版的HomeAssistant0.84版本中再次更新了Lovelace的配置方式,如果你之前配置并使用过Lovelace模式,下面我将演示一下如何在0.84版本中导入之前的Lovelace配置并启用全新的"半可视化"Lovelace配置模式。

请确保你的HomeAssistant已经升级到了0.84版本以上,确保你的配置文件夹根目录下有之前配置过的lovelace.yaml文件。

切换到Lovelace模式下,在右上角的下拉菜单中选中"配置UI",然后在弹出的对话框中选择"自己配置"。

TIM截图20181228094315.jpg

接着我们能在之前的下拉菜单中找到"Raw config editor"

TIM截图20181228094129.jpg

然后我们把之前配置过的lovelace.yaml文件中的所有内容复制到当前页面,并在右上角点"SAVE"保存。

TIM截图20181228094047.jpg

现在我们已经把之前配置过的Lovelace导入到新版本中了。

这样你可以再次点击"配置UI"来使用全新的可视化模式来配置Lovelace界面了。

如果你还是喜欢用yaml文件的方式来配置Lovelace界面,只需要将下面的字段插入到主配置文件中。

lovelace:
  mode: yaml

今天我在ifttt新建了三个自动同步应用,如果Wordpress有新文章发布,更新消息将会自动在twitter以及新浪微博发送一条更新通知,并会在印象笔记同步一条以文章为内容的笔记。

TIM截图20181213191941.png

TIM截图20181213191827.png

设置起来很简单,只需将你的各种平台的账号信息授权给ifttt,然后根据提示一步一步傻瓜式操作就可以了。

现在我们来测试一下同步效果吧。

经过测试及长时间的等待,Wordpress同步到Twitter及印象笔记均可以正常工作,但是无法同步到新浪微博,据网友反馈说,新浪微博早已关闭了来自ifttt的同步请求。

刚刚收到了Wordpress推送的5.0版本更新。

不出意外,这次WordPress强推了全新的古腾堡编辑器,经过几次版本更新,现在的古腾堡编辑器已经可以让使用者愉快的编辑文字了。

而且无须插件可以较为方便的插入代码。

目前编辑器的汉化工作还不是很完善,可以说是基本上没有汉化,英文不是很好的朋友上收起来还是有点困难的,好像现在Wordpress官方的汉化工作也迟迟没有推进,除了古腾堡编辑器,WordPress主程序也有好几处没有汉化到位。

####12月11日更新####

就在刚刚收到了5.0的中文汉化更新,之前WordPress主程序未汉化的部分也得到了汉化,赞一个。

TIM截图20181211173924.jpg

想退回使用原来的编辑器怎么办?后台搜索插件classic-editor安装应用,就可以回到原先的经典编辑器了,据官方介绍说该经典编辑器仅支持到2021年。

近日,苹果升级了智能音箱HomePod的固件,使其终于能够支持中文了,同步支持的语言还包括广东话。

而苹果中国官网也随即挂出了国行HomePod的页面,有白色和深空灰两种配色,售价均为2799元人民币,预计会在2019年初开放购买。

TIM截图20181206135234.jpg

HomePod是苹果公司发布的一款互联网智能音箱,内置自家的Siri语音助手,配合iPhone手机及Apple Music账户可以实现信息查询、播放音乐、接打电话、AirPlay等功能,配合家庭APP及HomeKit配件,可以实现智能家庭的语音控制。

HomePod同时也支持多台HomePod串联,组成多声道音响系统,也支持多个HomePod播放不同的内容,组成家庭背景音乐系统。

目前国内的各品牌智能音箱,无论从外观、功能及音质方面,都无法和HomePod直接竞争,当然也包括价格,而随着HomePod国行版的正式发售,苹果在国内的智能音箱及智能家居领域,必会有所斩获,毕竟苹果的用户体验是有目共睹的。

在最新的HomeAssistant0.83版本中,对小米无线开关、Aqara墙壁无线开关及魔方的自动化触发语句做了修改,大家可以按照下面的示例来进行相应的修改。

小米无线开关

- alias: Toggle dining light on single press
  trigger:
    platform: event
    event_type: xiaomi_aqara.click
    event_data:
      entity_id: binary_sensor.switch_158d000xxxxxc2
      click_type: single
  action:
    service: switch.toggle
    entity_id: switch.wall_switch_left_158d000xxxxx01
- alias: Toggle couch light on double click
  trigger:
    platform: event
    event_type: xiaomi_aqara.click
    event_data:
      entity_id: binary_sensor.switch_158d000xxxxxc2
      click_type: double
  action:
    service: switch.toggle
    entity_id: switch.wall_switch_right_158d000xxxxx01
- alias: Let a dog bark on long press
  trigger:
    platform: event
    event_type: xiaomi_aqara.click
    event_data:
      entity_id: binary_sensor.switch_158d000xxxxxc2
      click_type: long_click_press
  action:
    service: xiaomi_aqara.play_ringtone
    data:
      gw_mac: xxxxxxxxxxxx
      ringtone_id: 8
      ringtone_vol: 8

Aqara墙壁无线开关

- alias: Decrease brightness of the gateway light
  trigger:
    platform: event
    event_type: xiaomi_aqara.click
    event_data:
      entity_id: binary_sensor.wall_switch_left_158xxxxxxxxx12
      click_type: single
  action:
    service: light.turn_on
    entity_id: light.gateway_light_34xxxxxxxx13
    data_template:
      brightness: >-
        {% if states.light.gateway_light_34xxxxxxxx13.attributes.brightness %}
              {% if states.light.gateway_light_34xxxxxxxx13.attributes.brightness - 60 >= 10 %}
                {{states.light.gateway_light_34xxxxxxxx13.attributes.brightness - 60}}
              {% else %}
                {{states.light.gateway_light_34xxxxxxxx13.attributes.brightness}}
              {% endif %}
        {% else %}
          10
        {% endif %}

- alias: Increase brightness of the gateway light
  trigger:
    platform: event
    event_type: xiaomi_aqara.click
    event_data:
      entity_id: binary_sensor.wall_switch_right_158xxxxxxxxx12
      click_type: single
  action:
    service: light.turn_on
    entity_id: light.gateway_light_34xxxxxxxx13
    data_template:
      brightness: >-
        {% if states.light.gateway_light_34xxxxxxxx13.attributes.brightness %}
              {% if states.light.gateway_light_34xxxxxxxx13.attributes.brightness + 60 <= 255 %}
                {{states.light.gateway_light_34xxxxxxxx13.attributes.brightness + 60}}
              {% else %}
                {{states.light.gateway_light_34xxxxxxxx13.attributes.brightness}}
              {% endif %}
        {% else %}
          10
        {% endif %}

- alias: Turn off the gateway light
  trigger:
    platform: event
    event_type: xiaomi_aqara.click
    event_data:
      entity_id: binary_sensor.wall_switch_both_158xxxxxxxxx12
      click_type: both
  action:
    service: light.turn_off
    entity_id: light.gateway_light_34xxxxxxxx13

小米魔方

- alias: Cube event flip90
  trigger:
    platform: event
    event_type: xiaomi_aqara.cube_action
    event_data:
      entity_id: binary_sensor.cube_15xxxxxxxxxxxx
      action_type: flip90
  action:
    - service: light.turn_on
      entity_id: light.gateway_light_28xxxxxxxxxx
      data:
        color_name: "springgreen"
- alias: Cube event flip180
  trigger:
    platform: event
    event_type: xiaomi_aqara.cube_action
    event_data:
      entity_id: binary_sensor.cube_15xxxxxxxxxxxx
      action_type: flip180
  action:
    - service: light.turn_on
      entity_id: light.gateway_light_28xxxxxxxxxx
      data:
        color_name: "darkviolet"
- alias: Cube event move
  trigger:
    platform: event
    event_type: xiaomi_aqara.cube_action
    event_data:
      entity_id: binary_sensor.cube_15xxxxxxxxxxxx
      action_type: move
  action:
    - service: light.turn_on
      entity_id: light.gateway_light_28xxxxxxxxxx
      data:
        color_name: "gold"
- alias: Cube event tap_twice
  trigger:
    platform: event
    event_type: xiaomi_aqara.cube_action
    event_data:
      entity_id: binary_sensor.cube_15xxxxxxxxxxxx
      action_type: tap_twice
  action:
    - service: light.turn_on
      entity_id: light.gateway_light_28xxxxxxxxxx
      data:
        color_name: "deepskyblue"
- alias: Cube event shake_air
  trigger:
    platform: event
    event_type: xiaomi_aqara.cube_action
    event_data:
      entity_id: binary_sensor.cube_15xxxxxxxxxxxx
      action_type: shake_air
  action:
    - service: light.turn_on
      entity_id: light.gateway_light_28xxxxxxxxxx
      data:
        color_name: "blue"

Aqara震动传感器

- alias: Turn on Living Room Lamp on vibration
  trigger:
    platform: event
    event_type: xiaomi_aqara.movement
    event_data:
      entity_id: binary_sensor.vibration_xxxx000000
      movement_type: vibrate
  action:
    service: light.toggle
    data:
      entity_id: light.living_room_lamp
- alias: Turn on Living Room Lamp on tilt
  trigger:
    platform: event
    event_type: xiaomi_aqara.movement
    event_data:
      entity_id: binary_sensor.vibration_xxxx000000
      movement_type: tilt
  action:
    service: light.toggle
    data:
      entity_id: light.living_room_lamp