agittins / agittins/bermuda

device_tracker to include zones

未關閉
#653 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
2k
分支
70
PR 合併指標
30 天內沒有已合併 PR

描述

**Describe the solution you'd like**
For devices that support it, I'd like to be able to use the device_tracker to report on Zones. For devices that use the Home Assistant, we already have a device_tracker so this is not too valuable. Being able to report on `Home`/`Zone`/`Away` would be much more useful

**Additional context**
At the moment, I have to use my own template sensor to achieve this, as the mobile app sensor is my person sensor.
This yaml basically outputs my location to a new sensor by outputting the location of my Person sensor if I'm not home (which is either a Zone or Away) and then the Beacon location if I am at home

```yml
template:
- sensor:
- name: "Gregs Location"
state: >
{% set person = states('person.greg') %}
{% set beacon = states('sensor.gregs_s24_bermuda_area') %}
{% if person != 'home' %}
{% if person == 'not_home' %}
Away
{% else %}
{{ person | replace('_', ' ') | title }}
{% endif %}
{% else %}
{% if beacon != 'not_home' %}
{{ beacon | replace('_', ' ') | title }}
{% else %}
{{ person | replace('_', ' ') | title }}
{% endif %}
{% endif %}
```

NB: Bermuda might already do this out of the box, but I haven't had the opportunity to test, and i couldn't find it mentioned in the docs

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。