mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 03:37:07 +00:00
Migrate calendar services to support translations (#96310)
* Migrate camera services to support translations * Apply suggestions from code review Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --------- Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
parent
7d6148a295
commit
f3b0c56c8c
@ -1,6 +1,4 @@
|
|||||||
create_event:
|
create_event:
|
||||||
name: Create event
|
|
||||||
description: Add a new calendar event.
|
|
||||||
target:
|
target:
|
||||||
entity:
|
entity:
|
||||||
domain: calendar
|
domain: calendar
|
||||||
@ -8,73 +6,49 @@ create_event:
|
|||||||
- calendar.CalendarEntityFeature.CREATE_EVENT
|
- calendar.CalendarEntityFeature.CREATE_EVENT
|
||||||
fields:
|
fields:
|
||||||
summary:
|
summary:
|
||||||
name: Summary
|
|
||||||
description: Defines the short summary or subject for the event
|
|
||||||
required: true
|
required: true
|
||||||
example: "Department Party"
|
example: "Department Party"
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
description:
|
description:
|
||||||
name: Description
|
|
||||||
description: A more complete description of the event than that provided by the summary.
|
|
||||||
example: "Meeting to provide technical review for 'Phoenix' design."
|
example: "Meeting to provide technical review for 'Phoenix' design."
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
start_date_time:
|
start_date_time:
|
||||||
name: Start time
|
|
||||||
description: The date and time the event should start.
|
|
||||||
example: "2022-03-22 20:00:00"
|
example: "2022-03-22 20:00:00"
|
||||||
selector:
|
selector:
|
||||||
datetime:
|
datetime:
|
||||||
end_date_time:
|
end_date_time:
|
||||||
name: End time
|
|
||||||
description: The date and time the event should end.
|
|
||||||
example: "2022-03-22 22:00:00"
|
example: "2022-03-22 22:00:00"
|
||||||
selector:
|
selector:
|
||||||
datetime:
|
datetime:
|
||||||
start_date:
|
start_date:
|
||||||
name: Start date
|
|
||||||
description: The date the all-day event should start.
|
|
||||||
example: "2022-03-22"
|
example: "2022-03-22"
|
||||||
selector:
|
selector:
|
||||||
date:
|
date:
|
||||||
end_date:
|
end_date:
|
||||||
name: End date
|
|
||||||
description: The date the all-day event should end (exclusive).
|
|
||||||
example: "2022-03-23"
|
example: "2022-03-23"
|
||||||
selector:
|
selector:
|
||||||
date:
|
date:
|
||||||
in:
|
in:
|
||||||
name: In
|
|
||||||
description: Days or weeks that you want to create the event in.
|
|
||||||
example: '{"days": 2} or {"weeks": 2}'
|
example: '{"days": 2} or {"weeks": 2}'
|
||||||
location:
|
location:
|
||||||
name: Location
|
|
||||||
description: The location of the event.
|
|
||||||
example: "Conference Room - F123, Bldg. 002"
|
example: "Conference Room - F123, Bldg. 002"
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
list_events:
|
list_events:
|
||||||
name: List event
|
|
||||||
description: List events on a calendar within a time range.
|
|
||||||
target:
|
target:
|
||||||
entity:
|
entity:
|
||||||
domain: calendar
|
domain: calendar
|
||||||
fields:
|
fields:
|
||||||
start_date_time:
|
start_date_time:
|
||||||
name: Start time
|
|
||||||
description: Return active events after this time (exclusive). When not set, defaults to now.
|
|
||||||
example: "2022-03-22 20:00:00"
|
example: "2022-03-22 20:00:00"
|
||||||
selector:
|
selector:
|
||||||
datetime:
|
datetime:
|
||||||
end_date_time:
|
end_date_time:
|
||||||
name: End time
|
|
||||||
description: Return active events before this time (exclusive). Cannot be used with 'duration'.
|
|
||||||
example: "2022-03-22 22:00:00"
|
example: "2022-03-22 22:00:00"
|
||||||
selector:
|
selector:
|
||||||
datetime:
|
datetime:
|
||||||
duration:
|
duration:
|
||||||
name: Duration
|
|
||||||
description: Return active events from start_date_time until the specified duration.
|
|
||||||
selector:
|
selector:
|
||||||
duration:
|
duration:
|
||||||
|
@ -32,5 +32,63 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"services": {
|
||||||
|
"create_event": {
|
||||||
|
"name": "Create event",
|
||||||
|
"description": "Adds a new calendar event.",
|
||||||
|
"fields": {
|
||||||
|
"summary": {
|
||||||
|
"name": "Summary",
|
||||||
|
"description": "Defines the short summary or subject for the event."
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"name": "Description",
|
||||||
|
"description": "A more complete description of the event than the one provided by the summary."
|
||||||
|
},
|
||||||
|
"start_date_time": {
|
||||||
|
"name": "Start time",
|
||||||
|
"description": "The date and time the event should start."
|
||||||
|
},
|
||||||
|
"end_date_time": {
|
||||||
|
"name": "End time",
|
||||||
|
"description": "The date and time the event should end."
|
||||||
|
},
|
||||||
|
"start_date": {
|
||||||
|
"name": "Start date",
|
||||||
|
"description": "The date the all-day event should start."
|
||||||
|
},
|
||||||
|
"end_date": {
|
||||||
|
"name": "End date",
|
||||||
|
"description": "The date the all-day event should end (exclusive)."
|
||||||
|
},
|
||||||
|
"in": {
|
||||||
|
"name": "In",
|
||||||
|
"description": "Days or weeks that you want to create the event in."
|
||||||
|
},
|
||||||
|
"location": {
|
||||||
|
"name": "Location",
|
||||||
|
"description": "The location of the event."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"list_events": {
|
||||||
|
"name": "List event",
|
||||||
|
"description": "Lists events on a calendar within a time range.",
|
||||||
|
"fields": {
|
||||||
|
"start_date_time": {
|
||||||
|
"name": "Start time",
|
||||||
|
"description": "Returns active events after this time (exclusive). When not set, defaults to now."
|
||||||
|
},
|
||||||
|
"end_date_time": {
|
||||||
|
"name": "End time",
|
||||||
|
"description": "Returns active events before this time (exclusive). Cannot be used with 'duration'."
|
||||||
|
},
|
||||||
|
"duration": {
|
||||||
|
"name": "Duration",
|
||||||
|
"description": "Returns active events from start_date_time until the specified duration."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user