Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.42 KB | None | 0 0
  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
Add Comment
Please, Sign In to add comment
Advertisement