Class: MQTT::Homie::Device::Statistics

Inherits:
HomieObject show all
Defined in:
lib/mqtt/homie/device.rb

Overview

statistics should be sent every interval seconds homie/device_id/$stats

Instance Method Summary collapse

Methods inherited from HomieObject

#initialize, #topic

Methods included from HomieAttribute

included

Constructor Details

This class inherits a constructor from MQTT::Homie::HomieObject

Instance Method Details

#homie_attributesObject



46
47
48
# File 'lib/mqtt/homie/device.rb', line 46

def homie_attributes
  super.merge("uptime" => (Time.now - @boot_time).to_i)
end