Skip to content
Snippets Groups Projects
Commit 09ebfa88 authored by jkerdreu's avatar jkerdreu
Browse files

Added lightgauge



git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/trunk@2166 b32b6428-25c9-4566-ad07-03861ab6144f
parent 7a3b837a
Branches
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ import os
import ujson
from pprint import pprint
SCHEMA_DIR='/home/jkx/Devel/xaal_schemas'
BLACK_LIST=['json-online-validator.sh','Makefile','schema','xAAL_05_application-layer','xAAL_05_security-layer','xAAL_06_application-layer.cddl','xAAL_06_security-layer.cddl','xAAL_schema','.svn','schemarepository.basic_notice.txt']
BLACK_LIST=['json-online-validator.sh','Makefile','schema','xAAL_05_application-layer','xAAL_05_security-layer','xAAL_06_application-layer.cddl','xAAL_06_security-layer.cddl','xAAL_schema','.svn','schemarepository.basic_notice.txt','skels','.vscode']
def name_to_method(name):
if name.endswith('.basic'):
......
......@@ -287,7 +287,7 @@ def lamp_rgbw(addr=None):
dev.new_attribute('white_temperature')
# current animation scene
dev.new_attribute('scene')
# Current mode of the lamp white/rgb/scene
# Current mode of the lamp
dev.new_attribute('mode')
# -- Methods --
......@@ -358,6 +358,17 @@ def lamp_toggle(addr=None):
return dev
#=====================================================================
def lightgauge(addr=None):
"""Simple light gauge"""
if (addr==None):addr = tools.get_random_uuid()
dev = Device('lightgauge.basic',addr)
# -- Attributes --
# Brightness indicator without units (scaled in 100 levels of brightness; Information is transmitted in percentage). Simple LDR (photoresistor).
dev.new_attribute('brightness')
return dev
#=====================================================================
def linkquality(addr=None):
"""Report on quality of a transmission link"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment