Skip to content

Commit

Permalink
Update services.yaml & en.json
Browse files Browse the repository at this point in the history
  • Loading branch information
pnbruckner committed Apr 3, 2024
1 parent c5e2343 commit cdf9807
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
39 changes: 39 additions & 0 deletions custom_components/sun2/services.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,40 @@
reload: {}

get_location:
fields:
location:
required: true
example: Home
default: Home
selector:
text:

update_location:
fields:
location:
required: true
example: Home
default: Home
selector:
text:
latitude:
required: false
example: 51.51
selector:
number:
step: any
longitude:
required: false
example: -0.13
selector:
number:
step: any
time_zone:
required: false
example: Europe/London
selector:
text:
observer_elevation:
required: false
selector:
object:
33 changes: 33 additions & 0 deletions custom_components/sun2/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,42 @@
}
},
"services": {
"get_location": {
"name": "Get location",
"description": "Get location options.",
"fields": {
"location": {
"name": "Location",
"description": "Name of integration entry."
}
}
},
"reload": {
"name": "Reload",
"description": "Reloads Sun2 from the YAML-configuration."
},
"update_location": {
"name": "Update location",
"description": "Update location options. NOTE: If any of Latitude, Longitude & Time zone are specified, they must all be specified.",
"fields": {
"location": {
"name": "Location",
"description": "Name of Sun2 integration entry. YAML-based entries are not supported."
},
"latitude": {
"name": "Latitude"
},
"longitude": {
"name": "Longitude"
},
"time_zone": {
"name": "Time zone"
},
"observer_elevation": {
"name": "Observer elevation",
"description": "Elevation above ground level, or any two of above_ground, sunrise_obstruction & sunset_obstruction."
}
}
}
}
}

0 comments on commit cdf9807

Please sign in to comment.