Class: BatteryTemperatureTrigger

Inherits:
Trigger show all
Defined in:
lib/ruby-macrodroid.rb

Overview

Category: Battery/Power

Instance Attribute Summary

Attributes inherited from Trigger

#constraints

Attributes inherited from MacroObject

#options, #siguid, #type

Instance Method Summary collapse

Methods inherited from Trigger

#match?

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ BatteryTemperatureTrigger

Returns a new instance of BatteryTemperatureTrigger.



1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
# File 'lib/ruby-macrodroid.rb', line 1391

def initialize(h={})

  options = {
    decreases_to: true,
    option: 0,
    temperature: 30
  }

  super(options.merge h)

end

Instance Method Details

#to_s(colour: false) ⇒ Object Also known as: to_summary



1403
1404
1405
# File 'lib/ruby-macrodroid.rb', line 1403

def to_s(colour: false)
  'BatteryTemperatureTrigger ' + @h.inspect
end