Fix Temperature Sensor for AirOS 8.7.4+ (#13655)

* Fix Temperature Sensor for AirOS 8

* Update airos_airos8.json

* Update airos.json

* Add new skip_values feature to deal with Ubiquiti nonsense.
Tweak test data to test the change
fix not_regex

Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
Josh Jameson
2022-01-26 22:02:57 +00:00
committed by GitHub
parent 46aea1d7a6
commit 0b85bceb34
9 changed files with 76 additions and 41 deletions

View File

@@ -180,7 +180,7 @@ function compare_var($a, $b, $comparison = '=')
return ! Str::endsWith($a, $b);
case 'regex':
return (bool) preg_match($b, $a);
case 'not regex':
case 'not_regex':
return ! ((bool) preg_match($b, $a));
case 'in_array':
return in_array($a, $b);