[astro] Add getTotalRadiation to AstroActions (#14756)

* Add getTotalRadiation action

Signed-off-by: David Sislak <sisdale@seznam.cz>
This commit is contained in:
Dave
2023-04-07 22:17:32 +02:00
committed by GitHub
parent 36a594842e
commit 538ee94148
3 changed files with 52 additions and 11 deletions

View File

@@ -265,6 +265,16 @@ Example :
logInfo("AstroActions", "{} will be positioned at elevation {} - azimuth {}",sunEvent, elevation.toString,azimuth.toString)
```
### getTotalRadiation(timeStamp)
Retrieves the total radiation (QuantityType<Intensity>) of the sun at the requested instant.
Thing method only applies to Sun thing type.
```java
val totalRadiation = sunActions.getTotalRadiation(ZonedDateTime.now)
logInfo("AstroActions", "Currently, the total sun radiation is {}", totalRadiation.toString)
```
## Tips
Do not worry if for example the "astro dawn" is undefined at your location.