trigger 唔係比你用來一路行直至符合.
而係果一下就開始做野, 再睇果一下 其他condition 係咪符合.
e.g. 你個門磁 open from close 係 trigger, 再睇第二啲condition.
你個case根本冇define好.. 我會咁睇, 你可以 define 一個 variable, 去記住你認為合適既 human detection 時間範圍. 例如有 motion, 你會有個 automation 去update個variable = true 一段時間..之後變返 false (如果本身果個時間range你ok就唔駛新 variable添)..
咁你門磁做 trigger 就即刻check condition = true. 咁就再 action.

而個假switch, 係冇用既, 如果你諗住用來 on/off呢個 automation, 本身 automation 已經有on/off state.

TOP

我個idea想係咁: 個假switch係用黎搖控arm alarm。當我一出門口開始, 用HA arm alarm(一直monitor) , 直到隻門個state有變 or 室內有motion, 佢就send msg 俾我。整個假switch 係因為每日出門口時間都唔同,如果set timer 每日幾點著對我就唔係咁適用。
我明白如果唔係要arm alarm, 我個automation 可以好簡單. Trigger - door switch, Condition - motion detection, Action-send msg
但係我要arm alarm 個function放埋入去就唔太識個program可以點寫, 請問我個可以點做???thanks.

TOP

我個idea想係咁: 個假switch係用黎搖控arm alarm。當我一出門口開始, 用HA arm alarm(一直monitor) , 直到 ...
yinlocyrus 發表於 2021-9-10 14:51


如果你有用 HA APP 可以用 device_tracker/person 黎做 automation 再 on/off 個 alert 既 automation

TOP

我個idea想係咁: 個假switch係用黎搖控arm alarm。當我一出門口開始, 用HA arm alarm(一直monitor) , 直到 ...
yinlocyrus 發表於 2021-9-10 14:51



automation 個 trigger 就係用來一直run.
本身 automation 就係可以 arm / disarm. 唔駛整個假switch.. (本身都可以switch on off)
如果你係用 or...
咁就簡單到不得了, 但都係建議分開兩個 automation.
一個用門state 做 trigger, 一個用 motion 做 trigger, action就係 send message.
automation on off 係可以當 switch 咁用.

TOP

多謝兩位師兄先, 俾佢玩左好耐. programming 冇乜認識, 只係中學學過pascal , 打 if -then-else-if

TOP

回覆 45# yinlocyrus

係個 web 度
設定 > 自動化
禁幾下就得,完全唔洗識 coding

TOP

我個idea想係咁: 個假switch係用黎搖控arm alarm。當我一出門口開始, 用HA arm alarm(一直monitor) , 直到 ...
yinlocyrus 發表於 2021-9-10 14:51


唔明你個 alarm 有咩用??
即係除你之外, 有其他屋企人離開屋企就 send msg 比你??

呢排我都試緊HA, 尋晚岩岩知 HA 有 Bluetooth Tracker
開左之後, 去 developer 就會見HA 搵到咩 device, 去 config 度加人, device 就可以加佢個 device
再用 trigger 咩人離開就 send msg 就可以

TOP

提示: 作者被禁止或刪除 內容自動屏蔽

TOP

唔明你個 alarm 有咩用??
即係除你之外, 有其他屋企人離開屋企就 send msg 比你??

呢排我都試緊HA, 尋晚 ...
irvingtin 發表於 2021-9-13 15:52


呢個最好用 router integration 做. 家人手機駁左個wifi就係屋企.

TOP

知唔知入面條片個個physical switch button 係跟燈定係獨立買?
我都想買個咁嘅switch button 通過home a ...
takayo72 發表於 2023-4-16 13:17


你條link果個shortcut位置係HA setting.
想幫你睇睇但你條片成粒鐘, 我冇奶油幫你scroll 晒段片去答你掛?

TOP