File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -517,6 +517,7 @@ impl OneWire {
517
517
518
518
debug ! ( "doing stuff" ) ;
519
519
{
520
+ let mut night = false ;
520
521
let mut sensor_dev = self . sensor_devices . write ( ) . unwrap ( ) ;
521
522
let mut relay_dev = self . relay_devices . write ( ) . unwrap ( ) ;
522
523
@@ -609,7 +610,7 @@ impl OneWire {
609
610
"PIR_Trigger" => {
610
611
if !relay
611
612
. pir_exclude
612
- && on
613
+ && on && ( night || relay . pir_all_day )
613
614
{
614
615
//checking if bit is set (relay is off)
615
616
if !relay. override_mode && new_state & ( 1 << i as u8 ) != 0 {
@@ -731,6 +732,9 @@ impl OneWire {
731
732
"PIR_Trigger" => {
732
733
if !yeelight. pir_exclude
733
734
&& on
735
+ && ( night
736
+ || yeelight
737
+ . pir_all_day )
734
738
{
735
739
//checking if yeelight is off
736
740
if !yeelight
You can’t perform that action at this time.
0 commit comments