class ShellyplugExporter::Plug

Overview

Plug class represents a Shelly plug device and provides methods to query data from it.

config = ShellyplugExporter::Config.new
ShellyplugExporter::Plug.new(config)

Defined in:

shellyplug_exporter/plug.cr

Constant Summary

API_ENDPOINT = "/status"

API endpoint for querying plug status.

Constructors

Instance Method Summary

Constructor Detail

def self.new(config : Config) #

Initialize a new Plug instance.


Instance Method Detail

def query_data : Hash(Symbol, Float64 | Int64) #

Query data from the plug device.