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

#items, #method_missing, #things

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)



1181
1182
1183
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1181

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



1179
1180
1181
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1179

def url
  @url
end