Skip to content

Commit

Permalink
implement color temperature and lighting level (#459)
Browse files Browse the repository at this point in the history
* implement color temperature and lighting level

* missing import

* change naming convention to qudt

* only honor correlated color temperature for now

* more
  • Loading branch information
jbkoh authored Jan 25, 2024
1 parent 12deea6 commit 58a21a6
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 4 deletions.
14 changes: 13 additions & 1 deletion bricksrc/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,22 @@
},
},
"Relay_Command": {"tags": [TAG.Point, TAG.Relay, TAG.Command]},
"Light_Command": {"tags": [TAG.Point, TAG.Light, TAG.Command]},
"Level_Command": {
"tags": [TAG.Level, TAG.Command, TAG.Point],
},
"Lighting_Level_Command": {
"tags": [TAG.Point, TAG.Lighting, TAG.Level, TAG.Command]
},
"Lighting_Correlated_Color_Temperature_Command": {
"tags": [
TAG.Point,
TAG.Lighting,
TAG.Correlated,
TAG.Color,
TAG.Temperature,
TAG.Command,
],
},
"Speed_Command": {"tags": [TAG.Point, TAG.Speed, TAG.Command]},
"Cooling_Command": {"tags": [TAG.Point, TAG.Cool, TAG.Command]},
"Heating_Command": {"tags": [TAG.Point, TAG.Heat, TAG.Command]},
Expand Down
4 changes: 3 additions & 1 deletion bricksrc/definitions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,10 @@ https://brickschema.org/schema/Brick#Level,,
https://brickschema.org/schema/Brick#Level_Command,Adjusts the operational state to a specific level within a predefined range.,
https://brickschema.org/schema/Brick#Level_Status,The current operational state of a specific level within a predefined range.,
https://brickschema.org/schema/Brick#Library,"A place for the storage and/or consumption of physical media, e.g. books, periodicals, and DVDs/CDs",
https://brickschema.org/schema/Brick#Light_Command,Controls the amount of the light provided by the device,
https://brickschema.org/schema/Brick#Lighting,,
https://brickschema.org/schema/Brick#Lighting_Correlated_Color_Temperature_Command,A command to set correlated color temperature (CCT) which is the temperature of the Planckian radiator whose perceived color most closely resembles that of a given stimulus at the same brightness and under specified viewing conditions.,https://en.wikipedia.org/wiki/Color_temperature#Correlated_color_temperature
https://brickschema.org/schema/Brick#Lighting_Correlated_Color_Temperature_Sensor,A sensor to measure correlated color temperature (CCT) which is the temperature of the Planckian radiator whose perceived color most closely resembles that of a given stimulus at the same brightness and under specified viewing conditions.,https://en.wikipedia.org/wiki/Color_temperature#Correlated_color_temperature
https://brickschema.org/schema/Brick#Lighting_Level_Command,Controls the amount of the light provided by the device typically in percentages.,
https://brickschema.org/schema/Brick#Lighting_System,"The equipment, devices and interfaces that serve or are a part of the lighting subsystem in a building",
https://brickschema.org/schema/Brick#Lighting_Zone,,
https://brickschema.org/schema/Brick#Limit,A parameter that places an upper or lower bound on the range of permitted values of another point,
Expand Down
5 changes: 5 additions & 0 deletions bricksrc/deprecations.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@
"version": "1.3.0",
"mitigation_message": "Exhaust_Fan_Enable_Command is deprecated as a point name should not include more specific equipment names than top level equipment names",
"replace_with": BRICK.Enable_Command,
},
BRICK.Light_Command: {
"version": "1.3.1",
"mitigation_message": "Replaced with Lighting_Command to represent its function more precisely.",
"replace_with": BRICK.Lighting_Level_Command,
RDFS.subClassOf: BRICK.Command,
},
BRICK.Supply_Water_Temperature_Sensor: {
Expand Down
13 changes: 12 additions & 1 deletion bricksrc/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,18 @@
},
},
},
"Lighting_Correlated_Color_Temperature_Sensor": {
"tags": [
TAG.Point,
TAG.Lighting,
TAG.Correlated,
TAG.Color,
TAG.Temperature,
TAG.Sensor,
],
BRICK.hasQuantity: QUDTQK.CorrelatedColorTemperature,
BRICK.hasSubstance: BRICK.Light,
},
"Luminance_Sensor": {
"tags": [TAG.Point, TAG.Sensor, TAG.Luminance],
BRICK.hasQuantity: QUDTQK.Luminance,
Expand Down Expand Up @@ -1485,7 +1497,6 @@
"Refrigerant_Level_Sensor": {
BRICK.hasQuantity: BRICK.Level,
BRICK.hasSubstance: BRICK.Refrigerant,
"tags": [TAG.Point, TAG.Sensor, TAG.Refrigerant, TAG.Level],
},
"Solar_Irradiance_Sensor": {
"tags": [TAG.Point, TAG.Sensor, TAG.Irradiance, TAG.Solar],
Expand Down
5 changes: 4 additions & 1 deletion bricksrc/substances.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from .namespaces import BRICK, OWL, SKOS
from .namespaces import BRICK, OWL, SKOS, TAG

# Defining substances
substances = {
"Light": {
"tags": [TAG.Light],
},
"Fluid": {
SKOS.narrower: {
"Refrigerant": {},
Expand Down

0 comments on commit 58a21a6

Please sign in to comment.