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 4bf24ac
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
45 changes: 45 additions & 0 deletions custom_components/sun2/services.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,46 @@
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:
min: -90
max: 90
step: any
mode: box
longitude:
required: false
example: -0.13
selector:
number:
min: -180
max: 180
step: any
mode: box
time_zone:
required: false
example: Europe/London
selector:
text:
observer_elevation:
required: false
selector:
object:
36 changes: 36 additions & 0 deletions custom_components/sun2/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,45 @@
}
},
"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",
"description": "Latitude"
},
"longitude": {
"name": "Longitude",
"description": "Longitude"
},
"time_zone": {
"name": "Time zone",
"description": "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 4bf24ac

Please sign in to comment.