mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Migrate siren services to support translations (#96400)
* Migrate siren 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
c236d17343
commit
2d474813c0
@ -1,8 +1,6 @@
|
||||
# Describes the format for available siren services
|
||||
|
||||
turn_on:
|
||||
name: Turn on
|
||||
description: Turn siren on.
|
||||
target:
|
||||
entity:
|
||||
domain: siren
|
||||
@ -10,7 +8,6 @@ turn_on:
|
||||
- siren.SirenEntityFeature.TURN_ON
|
||||
fields:
|
||||
tone:
|
||||
description: The tone to emit when turning the siren on. When `available_tones` property is a map, either the key or the value can be used. Must be supported by the integration.
|
||||
example: fire
|
||||
filter:
|
||||
supported_features:
|
||||
@ -19,7 +16,6 @@ turn_on:
|
||||
selector:
|
||||
text:
|
||||
volume_level:
|
||||
description: The volume level of the noise to emit when turning the siren on. Must be supported by the integration.
|
||||
example: 0.5
|
||||
filter:
|
||||
supported_features:
|
||||
@ -31,7 +27,6 @@ turn_on:
|
||||
max: 1
|
||||
step: 0.05
|
||||
duration:
|
||||
description: The duration in seconds of the noise to emit when turning the siren on. Must be supported by the integration.
|
||||
example: 15
|
||||
filter:
|
||||
supported_features:
|
||||
@ -41,8 +36,6 @@ turn_on:
|
||||
text:
|
||||
|
||||
turn_off:
|
||||
name: Turn off
|
||||
description: Turn siren off.
|
||||
target:
|
||||
entity:
|
||||
domain: siren
|
||||
@ -50,8 +43,6 @@ turn_off:
|
||||
- siren.SirenEntityFeature.TURN_OFF
|
||||
|
||||
toggle:
|
||||
name: Toggle
|
||||
description: Toggles a siren.
|
||||
target:
|
||||
entity:
|
||||
domain: siren
|
||||
|
@ -13,5 +13,33 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"services": {
|
||||
"turn_on": {
|
||||
"name": "Turn on",
|
||||
"description": "Turns the siren on.",
|
||||
"fields": {
|
||||
"tone": {
|
||||
"name": "Tone",
|
||||
"description": "The tone to emit. When `available_tones` property is a map, either the key or the value can be used. Must be supported by the integration."
|
||||
},
|
||||
"volume_level": {
|
||||
"name": "Volume",
|
||||
"description": "The volume. 0 is inaudible, 1 is the maximum volume. Must be supported by the integration."
|
||||
},
|
||||
"duration": {
|
||||
"name": "Duration",
|
||||
"description": "Number of seconds the sound is played. Must be supported by the integration."
|
||||
}
|
||||
}
|
||||
},
|
||||
"turn_off": {
|
||||
"name": "Turn off",
|
||||
"description": "Turns the siren off."
|
||||
},
|
||||
"toggle": {
|
||||
"name": "Toggle",
|
||||
"description": "Toggles the siren on/off."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user