mirror of
https://github.com/He4eT/simple-spaceapi.git
synced 2026-05-05 01:47:24 +00:00
SpaceAPI: immutable humidity sensor
This commit is contained in:
parent
ac9dcd9753
commit
3f5282b3a7
1 changed files with 5 additions and 4 deletions
|
|
@ -243,10 +243,11 @@ export default ({ strapi }: { strapi: Core.Strapi }) => ({
|
|||
'lastchange',
|
||||
],
|
||||
)).map((sensor: {unit: string}) => {
|
||||
if (sensor.unit === 'percents') {
|
||||
sensor.unit = '%';
|
||||
}
|
||||
return sensor;
|
||||
const { unit, ...rest } = sensor;
|
||||
return {
|
||||
...rest,
|
||||
unit: unit === 'percents' ? '%' : unit,
|
||||
};
|
||||
});
|
||||
|
||||
const beverageSupplySensors = await getSensors(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue