Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
115
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.     my temperature #temp;
  5.     my temperature #temp2;
  6.  
  7.     has $temperature = #temp.value;
  8.     has $humidity    = #hum.value;
  9.     match {
  10.         [
  11.             temperature(#temp, value > 40, ?area == #hum.area )
  12.             &
  13.             humidity(#hum, value < 20, ?area == #temp.area)
  14.         ] 5min
  15.     }
  16. }
Advertisement
RAW Paste Data Copied
Advertisement