EasyManuals Logo

Embedded Systems LM5p-GSMC User Manual

Default Icon
291 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #140 background imageLoading...
Page #140 background image
140
dates = {
['start'] = { year = 2016, month = 4, day = 15 },
['end'] = { year = 2016, month = 4, day = 16 },
}
-- fetch current value
day = trends.fetchone('Gas', dates)
-- get data for the past year
dates = {}
dates['start'] = os.date('*t')
dates['start'].year = dates['start'].year - 1
dates['end'] = os.date('*t')
-- fetch previous value
yearly = trends.fetch('Gas', dates, 86400)
trends.NaN value is used for points which contain invalid values or cannot be found.
The default value is 0, but it can also be set to 0 / 0 (NaN - not a number).
Example:
require('trends')
-- use "not a number" for invalid values
trends.NaN = 0 / 0
-- get data for the past year
dates = {}
dates['start'] = os.date('*t')
dates['start'].year = dates['start'].year - 1
dates['end'] = os.date('*t')
value = trends.fetchone('Hot Water', dates)
-- NaN ~= NaN, means value was not found
if value ~= value then
return
end
6.7. Scenes
Scenes section allows creating scenes visually (without using event-based scripting).
Add scene

Table of Contents

Other manuals for Embedded Systems LM5p-GSMC

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Embedded Systems LM5p-GSMC and is the answer not in the manual?

Embedded Systems LM5p-GSMC Specifications

General IconGeneral
BrandEmbedded Systems
ModelLM5p-GSMC
CategoryDimmer
LanguageEnglish

Related product manuals