Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
208
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. event temperature { has $value, $area }
  2. event humidity    { has $value, $area }
  3. event fire-risk {
  4.     define {
  5.         temperature(#temp);
  6.         temperature(#temp2);
  7.     }
  8.     has $temperature = #temp.value;
  9.     has $humidity    = #hum.value;
  10.     match {
  11.         [
  12.             temperature(#temp, value > 40, ?area == #hum.area )
  13.             &
  14.             humidity(#hum, value < 20, ?area == #temp.area)
  15.         ] 5min
  16.     }
  17. }
Advertisement
RAW Paste Data Copied
Advertisement