TheRealAlexander / SEP4

SEP4 Project
https://therealalexander.github.io/SEP4/
2 stars 1 forks source link

Combined functions in the climateService to better control amount of … #135

Closed Rasmus-BK-Nielsen closed 4 months ago

Rasmus-BK-Nielsen commented 4 months ago

…requests for data. Functions in question are: setPreferredValue and useSensorData.

Also added a function to control windowState.

Pull Request (PR) Template

Description

A combination of functions to limit the amout of requests made to backend. Changes to wrappers to use the new functions instead of the old one. Added CO2 to the request-body, as it should already be sent with the data currently being transferred.

setPreferredValue now send the values of the following: preferredTemperature preferredHumidity The function is set to also take preferredCO2 even if we cannot actively control it.

Added a function to control windowState it works by sending either open or close to backend on the endboint /SetWindowState.

Type of Change

Checklist

Before submitting your PR, please ensure the following:

Screenshots (if appropriate)

Additional Notes

Include any additional information that you believe is important for the reviewers to know.