- alias: say_face_name
trigger:
platform: state
entity_id: image_processing.facerec
action:
- service: tts.baidu_say
data_template:
message: >
{% if states.image_processing.facerec.attributes["faces"][0]["uid"] == "cz" %}
你是XX,对吧?
{% else %}
判断有问题
{% endif %}
试了很多次,还是找不到正确的参数获取方法,能否指点 |