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, #value_colors, #visibilities

Method Summary

Methods inherited from LinkableWidgetBuilder

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

Methods included from Core::EntityLookup

#method_missing

Methods inherited from WidgetBuilder

#icon_color, #label_color, #value_color, #visibility

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)



873
874
875
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 873

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



871
872
873
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 871

def url
  @url
end