/**
* -----------------------------------------------------------------------------
* @package smartVISU
* @author Martin Gleiß
* @copyright 2012 - 2015
* @license GPL [http://www.gnu.de]
* -----------------------------------------------------------------------------
*/
// ----- nano parts -----------------------------------------------------------
{% macro sun(id) %}
{% endmacro %}
// ----------------------------------------------------------------------------
/**
* an arrow
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the arrow angle
* @param {value=0} the minimum value for 0° (optional, default 0, for future use)
* @param {value=255} the maximum value for 360° (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*/
{% macro arrow(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* a battery
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the charge level
* @param {value=0} the minimum value for 0 (optional, default 0, for future use)
* @param {value=255} the maximum value for 255 (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*/
{% macro battery(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* another battery
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the charge level
* @param {value=0} the minimum value for 0 (optional, default 0, for future use)
* @param {value=255} the maximum value for 255 (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*/
{% macro battery2(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* a blade (90°)
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the angle of the blades
* @param {value=0} the minimum value for 0 (optional, default 0, for future use)
* @param {value=255} the maximum value for 255 (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*
* @author Mario Zanier
*/
{% macro blade(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* a blade (180°)
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the angle of the blades
* @param {value=0} the minimum value for 0 (optional, default 0, for future use)
* @param {value=255} the maximum value for 255 (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*/
{% macro blade2(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* a blade (z profile)
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the angle of the blades
* @param {value=0} the minimum value for 0 (optional, default 0, for future use)
* @param {value=255} the maximum value for 255 (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*
* @author Mario Zanier
*/
{% macro blade_z(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* a blade (round profile)
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the angle of the blades
* @param {value=0} the minimum value for 0 (optional, default 0, for future use)
* @param {value=255} the maximum value for 255 (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*
* @author Mario Zanier
*/
{% macro blade_arc(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* a cistern
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the filling level
* @param {value=0} the minimum value for 0 (optional, default 0, for future use)
* @param {value=255} the maximum value for 255 (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*/
{% macro cistern(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* A clock
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the time
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*/
{% macro clock(id, item_switch, item_value, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* A compass
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the angle of the pin
* @param {value=0} the minimum value for 0° (optional, default 0, for future use)
* @param {value=255} the maximum value for 360° (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*/
{% macro compass(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* a garage door
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the travel of the door
* @param {value=0} the minimum value for 0 (optional, default 0, for future use)
* @param {value=255} the maximum value for 255 (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*/
{% macro garagedoor(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* a graph
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the height of the blades
* @param {value=0} the minimum value for 0 (optional, default 0, for future use)
* @param {value=255} the maximum value for 255 (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*/
{% macro graph(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* a heating
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the value
* @param {value=0} the minimum value for 0 (optional, default 0, for future use)
* @param {value=255} the maximum value for 255 (optional, default 255)
* @param {color=} color at begin of gradient e.g. '#f00' for red ('icon0' and 'icon1' can NOT be used)
*/
{% macro heating(id, item_switch, item_value, min, max, color) %}
{% set gradient_id = uid(page, id, item_value~'-gradient', color|default('')) %}
{% if once(gradient_id) %} /** add gradient definition only once per page */
{% endif %}
{% endmacro %}
/**
* a meter
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the angle of the pointer
* @param {value=0} the minimum value for 0 (optional, default 0, for future use)
* @param {value=255} the maximum value for 255 (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*/
{% macro meter(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* a roof window
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the opening
* @param {value=0} the value for closed (optional, default 0)
* @param {value=255} the value for fully open (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*/
{% macro roofwindow(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* a shutter
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the height of the blades
* @param {value=0} the value for top (optional, default 0)
* @param {value=255} the value for bottom (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*/
{% macro shutter(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* a ventilation
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the rotation speed
* @param {value=0} the minimum value for 0,5s rotation speed (optional, default 0, for future use)
* @param {value=255} the maximum value for 5s rotation speed (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*/
{% macro ventilation(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* a volume bar
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the volume level
* @param {value=0} the minimum value for 0 (optional, default 0, for future use)
* @param {value=255} the maximum value for 255 (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*/
{% macro volume(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* a windmill
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the rotation speed
* @param {value=0} the minimum value for 0,5s rotation speed (optional, default 0, for future use)
* @param {value=255} the maximum value for 5s rotation speed (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*/
{% macro windmill(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* a windrose
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the angle of the pin
* @param {value=0} the minimum value for 0° (optional, default 0, for future use)
* @param {value=255} the maximum value for 360° (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*/
{% macro windrose(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* a windsock
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the angle of the windsack
* @param {value=0} the minimum value for 0° (optional, default 0, for future use)
* @param {value=255} the maximum value for ~90° (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*/
{% macro windsock(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}
/**
* a zenith drawing
*
* @param {id=} unique id for this widget
* @param {item(bool,num)=} an item for switching
* @param {item(num)} an item for the movement of the sun
* @param {value=0} the minimum value for sunrise (optional, default 0, for future use)
* @param {value=255} the maximum value for sunset (optional, default 255)
* @param {color(icon0to5)=icon0} color e.g. '#f00' for red or icon0...icon5 (optional, default=icon0)
*/
{% macro zenith(id, item_switch, item_value, min, max, color) %}
{% set iconstyles = ['icon0', 'icon1', 'icon2', 'icon3', 'icon4', 'icon5'] %}
{% set color = color|default('icon0') %}
{% endmacro %}