Class: OpenHAB::DSL::Sitemaps::ImageBuilder

Inherits:
LinkableWidgetBuilder show all
Defined in:
lib/openhab/dsl/sitemaps/builder.rb

Overview

Builds an Image element

item can refer to either an ImageItem whose state is the raw data of the image, or a StringItem whose state is a URL that points to an image.

Instance Attribute Summary collapse

  • #refresh ⇒ Numeric?

    How often to refresh the image (in seconds).

  • #url ⇒ String?

    The default URL for the image, if there is no associated item, or if the associated item's state is not a URL.

Attributes inherited from WidgetBuilder

#icon, #icon_colors, #item, #label, #label_colors, #static_icon, #value_colors, #visibilities

Method Summary

Methods inherited from LinkableWidgetBuilder

#buttongrid, #chart, #colorpicker, #default, #frame, #group, #image, #input, #mapview, #selection, #setpoint, #slider, #switch, #text, #video, #webview

Methods inherited from WidgetBuilder

#icon_color, #label_color, #value_color, #visibility

Methods included from Core::EntityLookup

#method_missing

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class OpenHAB::Core::EntityLookup

Instance Attribute Details

#refreshNumeric?

Returns How often to refresh the image (in seconds).

Returns:

  • (Numeric, nil)

    How often to refresh the image (in seconds)



1117
1118
1119
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1117

def refresh
  @refresh
end

#urlString?

Returns The default URL for the image, if there is no associated item, or if the associated item's state is not a URL.

Returns:

  • (String, nil)

    The default URL for the image, if there is no associated item, or if the associated item's state is not a URL



1115
1116
1117
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1115

def url
  @url
end