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',
|
'lastchange',
|
||||||
],
|
],
|
||||||
)).map((sensor: {unit: string}) => {
|
)).map((sensor: {unit: string}) => {
|
||||||
if (sensor.unit === 'percents') {
|
const { unit, ...rest } = sensor;
|
||||||
sensor.unit = '%';
|
return {
|
||||||
}
|
...rest,
|
||||||
return sensor;
|
unit: unit === 'percents' ? '%' : unit,
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
const beverageSupplySensors = await getSensors(
|
const beverageSupplySensors = await getSensors(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue