CodeRabbitAI suggestions

This commit is contained in:
Edward Firmo
2024-12-19 23:39:32 +01:00
parent 81bf402e35
commit e9890c937e
7 changed files with 222 additions and 155 deletions

View File

@@ -21,8 +21,11 @@ api:
then:
- lambda: |-
if (!isnan(val)) {
if (component == "latitude") sun_entity->set_latitude(val);
else if (component == "longitude") sun_entity->set_longitude(val);
if (component == "latitude" && val >= -90 && val <= 90) {
sun_entity->set_latitude(val);
} else if (component == "longitude" && val >= -180 && val <= 180) {
sun_entity->set_longitude(val);
}
}
script: