Sensors: Temperature

This commit is contained in:
He4eT 2025-04-01 20:02:25 +02:00
commit fe49bf8307
5 changed files with 113 additions and 0 deletions

View file

@ -0,0 +1,45 @@
{
"kind": "collectionType",
"collectionName": "temperature_sensors",
"info": {
"singularName": "temperature-sensor",
"pluralName": "temperature-sensors",
"displayName": "Temperature Sensor"
},
"options": {
"draftAndPublish": false
},
"attributes": {
"value": {
"type": "decimal",
"required": true
},
"unit": {
"type": "enumeration",
"enum": [
"°C",
"°F",
"K",
"°De",
"°N",
"°R",
"°Ré",
"°Rø"
],
"required": true
},
"location": {
"type": "string",
"required": true
},
"name": {
"type": "string"
},
"description": {
"type": "text"
},
"lastchange": {
"type": "biginteger"
}
}
}

View file

@ -0,0 +1,7 @@
/**
* temperature-sensor controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::temperature-sensor.temperature-sensor');

View file

@ -0,0 +1,7 @@
/**
* temperature-sensor router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::temperature-sensor.temperature-sensor');

View file

@ -0,0 +1,7 @@
/**
* temperature-sensor service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::temperature-sensor.temperature-sensor');