本帖最后由 ryanh7 于 2022-8-15 16:37 编辑
配置示例:
sensor:
- platform: 某平台
name: "体重秤"
id: scale
- platform: template
name: "人员1的体重"
id: weight1
- platform: template
name: "人员2的体重"
id: weight2
# 其他基础配置
fpm383c:
on_match:
- if:
condition:
lambda: "return x.id == 0;"
then:
- lambda: "id(weight1).publish_state(id(scale).state);"
- if:
condition:
lambda: "return x.id == 1;"
then:
- lambda: "id(weight2).publish_state(id(scale).state);"
称完体重摸一下指纹,就登记了
|