Fix sensor link (#11454)

used bitwise operator instead of a logical one.
This commit is contained in:
Tony Murray
2020-04-21 10:19:41 -05:00
committed by GitHub
parent 4833edb7d6
commit 47b125b247

View File

@@ -424,16 +424,16 @@ class Url
/** /**
* Get html class for a sensor * Get html class for a sensor
* *
* @param Sensor $sensor * @param \App\Models\Sensor $sensor
* @return string * @return string
*/ */
public static function sensorLinkDisplayClass($sensor) public static function sensorLinkDisplayClass($sensor)
{ {
if ($sensor->sensor_current >> $sensor->sensor_limit) { if ($sensor->sensor_current > $sensor->sensor_limit) {
return "sensor-high"; return "sensor-high";
} }
if ($sensor->sensor_current << $sensor->sensor_limit_low) { if ($sensor->sensor_current < $sensor->sensor_limit_low) {
return "sensor-low"; return "sensor-low";
} }