I’ve tried to search through different topics without luck.
Is there any way to create a flow that notifies if a sensor value hasn’t changed/updated in, say 24 hours?
I basically want a notification if a sensor (eg. Aqara or Sonoff temp.) hasn’t changed.
I created this flow to identify unavailable devices, but I haven’t since I just created it, I haven’t had an alert yet.
Just hit “Update Text” and when you see code appear, hit the link “Homey API Playground”
This screen pops up, but first fully clear the input field with the default examples, and then CTRL + V (or use paste with the mouse menu)
Scroll back up, and hit the blue “Run” button.
Thank you both.
I needed to set the argument like you said @petomei
Thank you @Peter_Kawa for you contribution as well. I know you’re a very active member in the community - great work!
The vid is from a similar “card swap”, and there’s no argument used. I thought “get the picture” would suffice.
Should I make a vid for the specific flow you think?
I also tested the homeyscript card without entering the seconds in the argument field, and it just returned all sensors, not NaN… not sure what was different
Is there any way to only show certain censors like motion and temperature. Right now Chromecast values and other non-relevant values are part of the updates as well?
Yes you can adjust the code starting at line 10 - ish
// Exclude by app names virtual devices and other app devices
// (find correct app names via https://tools.developer.homey.app/tools/devices and look for "Driver")
if (device.driverUri.match('vdevice|DeviceCapabilities|chronograph|betterlogic|devicegroups|callmebot|netscan' )) continue;
// Exclude by (parts of) device name
if (device.name.match('^se|^pr|TST|z_|z |z. |IR|rris|eboo|rada|KNM|Timeline|#1|#0|ESP|esp|TV C|TV S|iffu|Unav|Wekk|OUD|OLD|Peter|Custom|Afval|LEDs')) continue;
You can change it to something like this:
// Exclude by app names
// (find correct app names via https://tools.developer.homey.app/tools/devices and look for "Driver")
if (device.driverUri.match('appNameYouDontWant|OtherAppNameYouDontWant')) continue;
// Include by app names
if (!device.driverUri.match('appNameYouWant|OtherAppNameYouWant')) continue;
// Exclude by (parts of) device name
if (device.name.match('nameOfSensorYouDontWantToCheck|nameOfOtherSensorYouDontWantToCheck')) continue;
// Include by (parts of) device name
if (!device.name.match('nameOfSensorYouWantToCheck|nameOfOtherSensorYouWantToCheck')) continue;
They should be excluded afaik, not included …
When I comment out (=disable) the “if (device.driverUri…” line, they all appear here, and I don´t want that:
// Exclude by app names
// (find correct app names via https://tools.developer.homey.app/tools/devices and look for "Driver")
////if (device.driverUri.match('vdevice|DeviceCapabilities|chronograph|betterlogic|devicegroups|callmebot|netscan' )) continue;
The Device capability app has a card to retrive latest change for a device and its capability. The value will be in millisec so compare it to 2436001000. I am doing this for my important devices, works great.
Leaning towards Device Capabilities and ‘Duration till now’ result tag. This way there’s only one minimum duration instead of multiple LastUpdated records.
But how to call the ‘Retreive Insights’ THEN flowcard from a Homeyscript?
Hi, I used this flow and it works, only issue I have is that every device is being listed as no communication in last 12 hours. For example though, I see some devices have communicated with homey in that time. Does anyone have any ideas. Is there a way to check the last communication time for an individual device?