From 8d360611d1bb9046295340d6b8e51f00648ae786 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 12 Jul 2023 07:36:51 +0200 Subject: [PATCH] Migrate integration services (W-Z) to support translations (#96381) --- .../components/wake_on_lan/services.yaml | 8 - .../components/wake_on_lan/strings.json | 22 ++ .../components/webostv/services.yaml | 25 -- homeassistant/components/webostv/strings.json | 48 ++++ homeassistant/components/wemo/services.yaml | 6 - homeassistant/components/wemo/strings.json | 16 ++ .../components/wilight/services.yaml | 14 - homeassistant/components/wilight/strings.json | 36 +++ homeassistant/components/wled/services.yaml | 16 -- homeassistant/components/wled/strings.json | 38 +++ .../components/xiaomi_aqara/services.yaml | 28 -- .../components/xiaomi_aqara/strings.json | 54 ++++ .../components/xiaomi_miio/services.yaml | 98 ------- .../components/xiaomi_miio/strings.json | 266 ++++++++++++++++++ homeassistant/components/yamaha/services.yaml | 14 - homeassistant/components/yamaha/strings.json | 38 +++ .../components/yeelight/services.yaml | 95 ++----- .../components/yeelight/strings.json | 133 +++++++++ .../components/zoneminder/services.yaml | 4 - .../components/zoneminder/strings.json | 14 + 20 files changed, 686 insertions(+), 287 deletions(-) create mode 100644 homeassistant/components/wake_on_lan/strings.json create mode 100644 homeassistant/components/yamaha/strings.json create mode 100644 homeassistant/components/zoneminder/strings.json diff --git a/homeassistant/components/wake_on_lan/services.yaml b/homeassistant/components/wake_on_lan/services.yaml index ea374a88b8f..48d3df5c4f9 100644 --- a/homeassistant/components/wake_on_lan/services.yaml +++ b/homeassistant/components/wake_on_lan/services.yaml @@ -1,23 +1,15 @@ send_magic_packet: - name: Send magic packet - description: Send a 'magic packet' to wake up a device with 'Wake-On-LAN' capabilities. fields: mac: - name: MAC address - description: MAC address of the device to wake up. required: true example: "aa:bb:cc:dd:ee:ff" selector: text: broadcast_address: - name: Broadcast address - description: Broadcast IP where to send the magic packet. example: 192.168.255.255 selector: text: broadcast_port: - name: Broadcast port - description: Port where to send the magic packet. default: 9 selector: number: diff --git a/homeassistant/components/wake_on_lan/strings.json b/homeassistant/components/wake_on_lan/strings.json new file mode 100644 index 00000000000..8395bc7503a --- /dev/null +++ b/homeassistant/components/wake_on_lan/strings.json @@ -0,0 +1,22 @@ +{ + "services": { + "send_magic_packet": { + "name": "Send magic packet", + "description": "Sends a 'magic packet' to wake up a device with 'Wake-On-LAN' capabilities.", + "fields": { + "mac": { + "name": "MAC address", + "description": "MAC address of the device to wake up." + }, + "broadcast_address": { + "name": "Broadcast address", + "description": "Broadcast IP where to send the magic packet." + }, + "broadcast_port": { + "name": "Broadcast port", + "description": "Port where to send the magic packet." + } + } + } + } +} diff --git a/homeassistant/components/webostv/services.yaml b/homeassistant/components/webostv/services.yaml index 1985857d128..c3297dd8902 100644 --- a/homeassistant/components/webostv/services.yaml +++ b/homeassistant/components/webostv/services.yaml @@ -1,52 +1,33 @@ # Describes the format for available webostv services button: - name: Button - description: "Send a button press command." fields: entity_id: - name: Entity - description: Name(s) of the webostv entities where to run the API method. required: true selector: entity: integration: webostv domain: media_player button: - name: Button - description: >- - Name of the button to press. Known possible values are - LEFT, RIGHT, DOWN, UP, HOME, MENU, BACK, ENTER, DASH, INFO, ASTERISK, CC, EXIT, - MUTE, RED, GREEN, BLUE, YELLOW, VOLUMEUP, VOLUMEDOWN, CHANNELUP, CHANNELDOWN, - PLAY, PAUSE, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 required: true example: "LEFT" selector: text: command: - name: Command - description: "Send a command." fields: entity_id: - name: Entity - description: Name(s) of the webostv entities where to run the API method. required: true selector: entity: integration: webostv domain: media_player command: - name: Command - description: Endpoint of the command. required: true example: "system.launcher/open" selector: text: payload: - name: Payload - description: >- - An optional payload to provide to the endpoint in the format of key value pair(s). example: >- target: https://www.google.com advanced: true @@ -54,20 +35,14 @@ command: object: select_sound_output: - name: Select Sound Output - description: "Send the TV the command to change sound output." fields: entity_id: - name: Entity - description: Name(s) of the webostv entities to change sound output on. required: true selector: entity: integration: webostv domain: media_player sound_output: - name: Sound Output - description: Name of the sound output to switch to. required: true example: "external_speaker" selector: diff --git a/homeassistant/components/webostv/strings.json b/homeassistant/components/webostv/strings.json index c623effe22b..985edb05645 100644 --- a/homeassistant/components/webostv/strings.json +++ b/homeassistant/components/webostv/strings.json @@ -48,5 +48,53 @@ "trigger_type": { "webostv.turn_on": "Device is requested to turn on" } + }, + "services": { + "button": { + "name": "Button", + "description": "Sends a button press command.", + "fields": { + "entity_id": { + "name": "Entity", + "description": "Name(s) of the webostv entities where to run the API method." + }, + "button": { + "name": "Button", + "description": "Name of the button to press. Known possible values are LEFT, RIGHT, DOWN, UP, HOME, MENU, BACK, ENTER, DASH, INFO, ASTERISK, CC, EXIT, MUTE, RED, GREEN, BLUE, YELLOW, VOLUMEUP, VOLUMEDOWN, CHANNELUP, CHANNELDOWN, PLAY, PAUSE, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9." + } + } + }, + "command": { + "name": "Command", + "description": "Sends a command.", + "fields": { + "entity_id": { + "name": "Entity", + "description": "Name(s) of the webostv entities where to run the API method." + }, + "command": { + "name": "Command", + "description": "Endpoint of the command." + }, + "payload": { + "name": "Payload", + "description": "An optional payload to provide to the endpoint in the format of key value pair(s)." + } + } + }, + "select_sound_output": { + "name": "Select sound output", + "description": "Sends the TV the command to change sound output.", + "fields": { + "entity_id": { + "name": "Entity", + "description": "Name(s) of the webostv entities to change sound output on." + }, + "sound_output": { + "name": "Sound output", + "description": "Name of the sound output to switch to." + } + } + } } } diff --git a/homeassistant/components/wemo/services.yaml b/homeassistant/components/wemo/services.yaml index 58305798cf9..59f38ca77a0 100644 --- a/homeassistant/components/wemo/services.yaml +++ b/homeassistant/components/wemo/services.yaml @@ -1,14 +1,10 @@ set_humidity: - name: Set humidity - description: Set the target humidity of WeMo humidifier devices. target: entity: integration: wemo domain: fan fields: target_humidity: - name: Target humidity - description: Target humidity. required: true selector: number: @@ -18,8 +14,6 @@ set_humidity: unit_of_measurement: "%" reset_filter_life: - name: Reset filter life - description: Reset the WeMo Humidifier's filter life to 100%. target: entity: integration: wemo diff --git a/homeassistant/components/wemo/strings.json b/homeassistant/components/wemo/strings.json index b218f758985..66fa656ebfe 100644 --- a/homeassistant/components/wemo/strings.json +++ b/homeassistant/components/wemo/strings.json @@ -28,5 +28,21 @@ "trigger_type": { "long_press": "Wemo button was pressed for 2 seconds" } + }, + "services": { + "set_humidity": { + "name": "Set humidity", + "description": "Sets the target humidity of WeMo humidifier devices.", + "fields": { + "target_humidity": { + "name": "Target humidity", + "description": "Target humidity." + } + } + }, + "reset_filter_life": { + "name": "Reset filter life", + "description": "Resets the WeMo Humidifier's filter life to 100%." + } } } diff --git a/homeassistant/components/wilight/services.yaml b/homeassistant/components/wilight/services.yaml index b6c538bf9fb..044a46784ef 100644 --- a/homeassistant/components/wilight/services.yaml +++ b/homeassistant/components/wilight/services.yaml @@ -1,31 +1,17 @@ set_watering_time: - name: Set watering time - description: Sets time for watering target: fields: watering_time: - name: Duration - description: Duration for this irrigation to be turned on. example: 30 set_pause_time: - name: Set pause time - description: Sets time to pause. target: fields: pause_time: - name: Duration - description: Duration for this irrigation to be paused. example: 24 set_trigger: - name: Set trigger - description: Set the trigger to use. target: fields: trigger_index: - name: Trigger index - description: Index of Trigger from 1 to 4 example: "1" trigger: - name: Trigger rules - description: Configuration of trigger. example: "'12707001'" diff --git a/homeassistant/components/wilight/strings.json b/homeassistant/components/wilight/strings.json index 0449a900c29..a287104e7ad 100644 --- a/homeassistant/components/wilight/strings.json +++ b/homeassistant/components/wilight/strings.json @@ -11,5 +11,41 @@ "not_supported_device": "This WiLight is currently not supported", "not_wilight_device": "This Device is not WiLight" } + }, + "services": { + "set_watering_time": { + "name": "Set watering time", + "description": "Sets time for watering.", + "fields": { + "watering_time": { + "name": "Duration", + "description": "Duration for this irrigation to be turned on." + } + } + }, + "set_pause_time": { + "name": "Set pause time", + "description": "Sets time to pause.", + "fields": { + "pause_time": { + "name": "Duration", + "description": "Duration for this irrigation to be paused." + } + } + }, + "set_trigger": { + "name": "Set trigger", + "description": "Sets the trigger to use.", + "fields": { + "trigger_index": { + "name": "Trigger index", + "description": "Index of Trigger from 1 to 4." + }, + "trigger": { + "name": "Trigger rules", + "description": "Configuration of trigger." + } + } + } } } diff --git a/homeassistant/components/wled/services.yaml b/homeassistant/components/wled/services.yaml index 9ca73fac0a3..40170fd54e9 100644 --- a/homeassistant/components/wled/services.yaml +++ b/homeassistant/components/wled/services.yaml @@ -1,55 +1,39 @@ effect: - name: Set effect - description: Control the effect settings of WLED. target: entity: integration: wled domain: light fields: effect: - name: Effect - description: Name or ID of the WLED light effect. example: "Rainbow" selector: text: intensity: - name: Effect intensity - description: Intensity of the effect. Number between 0 and 255. selector: number: min: 0 max: 255 palette: - name: Color palette - description: Name or ID of the WLED light palette. example: "Tiamat" selector: text: speed: - name: Effect speed - description: Speed of the effect. selector: number: min: 0 max: 255 reverse: - name: Reverse effect - description: Reverse the effect. Either true to reverse or false otherwise. default: false selector: boolean: preset: - name: Set preset (deprecated) - description: Set a preset for the WLED device. target: entity: integration: wled domain: light fields: preset: - name: Preset ID - description: ID of the WLED preset selector: number: min: -1 diff --git a/homeassistant/components/wled/strings.json b/homeassistant/components/wled/strings.json index eed62ab0499..9fc6573b112 100644 --- a/homeassistant/components/wled/strings.json +++ b/homeassistant/components/wled/strings.json @@ -41,5 +41,43 @@ } } } + }, + "services": { + "effect": { + "name": "Set effect", + "description": "Controls the effect settings of WLED.", + "fields": { + "effect": { + "name": "Effect", + "description": "Name or ID of the WLED light effect." + }, + "intensity": { + "name": "Effect intensity", + "description": "Intensity of the effect. Number between 0 and 255." + }, + "palette": { + "name": "Color palette", + "description": "Name or ID of the WLED light palette." + }, + "speed": { + "name": "Effect speed", + "description": "Speed of the effect." + }, + "reverse": { + "name": "Reverse effect", + "description": "Reverse the effect. Either true to reverse or false otherwise." + } + } + }, + "preset": { + "name": "Set preset (deprecated)", + "description": "Sets a preset for the WLED device.", + "fields": { + "preset": { + "name": "Preset ID", + "description": "ID of the WLED preset." + } + } + } } } diff --git a/homeassistant/components/xiaomi_aqara/services.yaml b/homeassistant/components/xiaomi_aqara/services.yaml index 75a9b9156c1..dcf79ebc215 100644 --- a/homeassistant/components/xiaomi_aqara/services.yaml +++ b/homeassistant/components/xiaomi_aqara/services.yaml @@ -1,70 +1,42 @@ add_device: - name: Add device - description: - Enables the join permission of the Xiaomi Aqara Gateway for 30 seconds. - A new device can be added afterwards by pressing the pairing button once. fields: gw_mac: - name: Gateway MAC - description: MAC address of the Xiaomi Aqara Gateway. required: true example: 34ce00880088 selector: text: play_ringtone: - name: play ringtone - description: - Play a specific ringtone. The version of the gateway firmware must - be 1.4.1_145 at least. fields: gw_mac: - name: Gateway MAC - description: MAC address of the Xiaomi Aqara Gateway. required: true example: 34ce00880088 selector: text: ringtone_id: - name: Ringtone ID - description: One of the allowed ringtone ids. required: true example: 8 selector: text: ringtone_vol: - name: Ringtone volume - description: The volume in percent. selector: number: min: 0 max: 100 remove_device: - name: Remove device - description: - Removes a specific device. The removal is required if a device shall - be paired with another gateway. fields: device_id: - name: Device ID - description: Hardware address of the device to remove. required: true example: 158d0000000000 selector: text: gw_mac: - name: Gateway MAC - description: MAC address of the Xiaomi Aqara Gateway. required: true example: 34ce00880088 selector: text: stop_ringtone: - name: Stop ringtone - description: Stops a playing ringtone immediately. fields: gw_mac: - name: Gateway MAC - description: MAC address of the Xiaomi Aqara Gateway. required: true example: 34ce00880088 selector: diff --git a/homeassistant/components/xiaomi_aqara/strings.json b/homeassistant/components/xiaomi_aqara/strings.json index 63fb48542c9..0944c91fd83 100644 --- a/homeassistant/components/xiaomi_aqara/strings.json +++ b/homeassistant/components/xiaomi_aqara/strings.json @@ -37,5 +37,59 @@ "already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]", "not_xiaomi_aqara": "Not a Xiaomi Aqara Gateway, discovered device did not match known gateways" } + }, + "services": { + "add_device": { + "name": "Add device", + "description": "Enables the join permission of the Xiaomi Aqara Gateway for 30 seconds. A new device can be added afterwards by pressing the pairing button once.", + "fields": { + "gw_mac": { + "name": "Gateway MAC", + "description": "MAC address of the Xiaomi Aqara Gateway." + } + } + }, + "play_ringtone": { + "name": "Play ringtone", + "description": "Plays a specific ringtone. The version of the gateway firmware must be 1.4.1_145 at least.", + "fields": { + "gw_mac": { + "name": "Gateway MAC", + "description": "MAC address of the Xiaomi Aqara Gateway." + }, + "ringtone_id": { + "name": "Ringtone ID", + "description": "One of the allowed ringtone ids." + }, + "ringtone_vol": { + "name": "Ringtone volume", + "description": "The volume in percent." + } + } + }, + "remove_device": { + "name": "Remove device", + "description": "Removes a specific device. The removal is required if a device shall be paired with another gateway.", + "fields": { + "device_id": { + "name": "Device ID", + "description": "Hardware address of the device to remove." + }, + "gw_mac": { + "name": "Gateway MAC", + "description": "MAC address of the Xiaomi Aqara Gateway." + } + } + }, + "stop_ringtone": { + "name": "Stop ringtone", + "description": "Stops a playing ringtone immediately.", + "fields": { + "gw_mac": { + "name": "Gateway MAC", + "description": "MAC address of the Xiaomi Aqara Gateway." + } + } + } } } diff --git a/homeassistant/components/xiaomi_miio/services.yaml b/homeassistant/components/xiaomi_miio/services.yaml index e1cf03ba4ee..0b3bd6435e4 100644 --- a/homeassistant/components/xiaomi_miio/services.yaml +++ b/homeassistant/components/xiaomi_miio/services.yaml @@ -1,27 +1,19 @@ fan_reset_filter: - name: Fan reset filter - description: Reset the filter lifetime and usage. fields: entity_id: - description: Name of the xiaomi miio entity. selector: entity: integration: xiaomi_miio domain: fan fan_set_extra_features: - name: Fan set extra features - description: Manipulates a storage register which advertises extra features. The Mi Home app evaluates the value. A feature called "turbo mode" is unlocked in the app on value 1. fields: entity_id: - description: Name of the xiaomi miio entity. selector: entity: integration: xiaomi_miio domain: fan features: - name: Features - description: Integer, known values are 0 (default) and 1 (turbo mode). required: true selector: number: @@ -29,18 +21,13 @@ fan_set_extra_features: max: 1 light_set_scene: - name: Light set scene - description: Set a fixed scene. fields: entity_id: - description: Name of the light entity. selector: entity: integration: xiaomi_miio domain: light scene: - name: Scene - description: Number of the fixed scene. required: true selector: number: @@ -48,108 +35,79 @@ light_set_scene: max: 6 light_set_delayed_turn_off: - name: Light set delayed turn off - description: Delayed turn off. fields: entity_id: - description: Name of the light entity. selector: entity: integration: xiaomi_miio domain: light time_period: - name: Time period - description: Time period for the delayed turn off. required: true example: "5, '0:05', {'minutes': 5}" selector: object: light_reminder_on: - name: Light reminder on - description: Enable the eye fatigue reminder/notification (EYECARE SMART LAMP 2 ONLY). fields: entity_id: - description: "Name of the entity to act on." selector: entity: integration: xiaomi_miio domain: light light_reminder_off: - name: Light reminder off - description: Disable the eye fatigue reminder/notification (EYECARE SMART LAMP 2 ONLY). fields: entity_id: - description: "Name of the entity to act on." selector: entity: integration: xiaomi_miio domain: light light_night_light_mode_on: - name: Night light mode on - description: Turn the eyecare mode on (EYECARE SMART LAMP 2 ONLY). fields: entity_id: - description: "Name of the entity to act on." selector: entity: integration: xiaomi_miio domain: light light_night_light_mode_off: - name: Night light mode off - description: Turn the eyecare mode fan_set_dry_off (EYECARE SMART LAMP 2 ONLY). fields: entity_id: - description: "Name of the entity to act on." selector: entity: integration: xiaomi_miio domain: light light_eyecare_mode_on: - name: Light eyecare mode on - description: Enable the eye fatigue reminder/notification (EYECARE SMART LAMP 2 ONLY). fields: entity_id: - description: "Name of the entity to act on." selector: entity: integration: xiaomi_miio domain: light light_eyecare_mode_off: - name: Light eyecare mode off - description: Disable the eye fatigue reminder/notification (EYECARE SMART LAMP 2 ONLY). fields: entity_id: - description: "Name of the entity to act on." selector: entity: integration: xiaomi_miio domain: light remote_learn_command: - name: Remote learn command - description: 'Learn an IR command, press "Call Service", point the remote at the IR device, and the learned command will be shown as a notification in Overview.' target: entity: integration: xiaomi_miio domain: remote fields: slot: - name: Slot - description: "Define the slot used to save the IR command." default: 1 selector: number: min: 1 max: 1000000 timeout: - name: Timeout - description: "Define the timeout, before which the command must be learned." default: 10 selector: number: @@ -158,56 +116,41 @@ remote_learn_command: unit_of_measurement: seconds remote_set_led_on: - name: Remote set LED on - description: "Turn on blue LED." target: entity: integration: xiaomi_miio domain: remote remote_set_led_off: - name: Remote set LED off - description: "Turn off blue LED." target: entity: integration: xiaomi_miio domain: remote switch_set_wifi_led_on: - name: Switch set Wi-fi LED on - description: Turn the wifi led on. fields: entity_id: - description: Name of the xiaomi miio entity. selector: entity: integration: xiaomi_miio domain: switch switch_set_wifi_led_off: - name: Switch set Wi-fi LED off - description: Turn the wifi led off. fields: entity_id: - description: Name of the xiaomi miio entity. selector: entity: integration: xiaomi_miio domain: switch switch_set_power_price: - name: Switch set power price - description: Set the power price. fields: entity_id: - description: Name of the xiaomi miio entity. selector: entity: integration: xiaomi_miio domain: switch mode: - name: Mode - description: Power price. required: true selector: number: @@ -215,18 +158,13 @@ switch_set_power_price: max: 999 switch_set_power_mode: - name: Switch set power mode - description: Set the power mode. fields: entity_id: - description: Name of the xiaomi miio entity. selector: entity: integration: xiaomi_miio domain: switch mode: - name: Mode - description: Power mode. required: true selector: select: @@ -235,48 +173,36 @@ switch_set_power_mode: - "normal" vacuum_remote_control_start: - name: Vacuum remote control start - description: Start remote control of the vacuum cleaner. You can then move it with `remote_control_move`, when done call `remote_control_stop`. target: entity: integration: xiaomi_miio domain: vacuum vacuum_remote_control_stop: - name: Vacuum remote control stop - description: Stop remote control mode of the vacuum cleaner. target: entity: integration: xiaomi_miio domain: vacuum vacuum_remote_control_move: - name: Vacuum remote control move - description: Remote control the vacuum cleaner, make sure you first set it in remote control mode with `remote_control_start`. target: entity: integration: xiaomi_miio domain: vacuum fields: velocity: - name: Velocity - description: Speed. selector: number: min: -0.29 max: 0.29 step: 0.01 rotation: - name: Rotation - description: Rotation, between -179 degrees and 179 degrees. selector: number: min: -179 max: 179 unit_of_measurement: "°" duration: - name: Duration - description: Duration of the movement. selector: number: min: 1 @@ -284,32 +210,24 @@ vacuum_remote_control_move: unit_of_measurement: seconds vacuum_remote_control_move_step: - name: Vacuum remote control move step - description: Remote control the vacuum cleaner, only makes one move and then stops. target: entity: integration: xiaomi_miio domain: vacuum fields: velocity: - name: Velocity - description: Speed. selector: number: min: -0.29 max: 0.29 step: 0.01 rotation: - name: Rotation - description: Rotation. selector: number: min: -179 max: 179 unit_of_measurement: "°" duration: - name: Duration - description: Duration of the movement. selector: number: min: 1 @@ -317,59 +235,43 @@ vacuum_remote_control_move_step: unit_of_measurement: seconds vacuum_clean_zone: - name: Vacuum clean zone - description: Start the cleaning operation in the selected areas for the number of repeats indicated. target: entity: integration: xiaomi_miio domain: vacuum fields: zone: - name: Zone - description: Array of zones. Each zone is an array of 4 integer values. example: "[[23510,25311,25110,26362]]" selector: object: repeats: - name: Repeats - description: Number of cleaning repeats for each zone. selector: number: min: 1 max: 3 vacuum_goto: - name: Vacuum go to - description: Go to the specified coordinates. target: entity: integration: xiaomi_miio domain: vacuum fields: x_coord: - name: X coordinate - description: x-coordinate. example: 27500 selector: text: y_coord: - name: Y coordinate - description: y-coordinate. example: 32000 selector: text: vacuum_clean_segment: - name: Vacuum clean segment - description: Start cleaning of the specified segment(s). target: entity: integration: xiaomi_miio domain: vacuum fields: segments: - name: Segments - description: Segments. example: "[1,2]" selector: object: diff --git a/homeassistant/components/xiaomi_miio/strings.json b/homeassistant/components/xiaomi_miio/strings.json index 15c89498bc7..578d2a96ff8 100644 --- a/homeassistant/components/xiaomi_miio/strings.json +++ b/homeassistant/components/xiaomi_miio/strings.json @@ -94,5 +94,271 @@ } } } + }, + "services": { + "fan_reset_filter": { + "name": "Fan reset filter", + "description": "Resets the filter lifetime and usage.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the xiaomi miio entity." + } + } + }, + "fan_set_extra_features": { + "name": "Fan set extra features", + "description": "Manipulates a storage register which advertises extra features. The Mi Home app evaluates the value. A feature called \"turbo mode\" is unlocked in the app on value 1.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the xiaomi miio entity." + }, + "features": { + "name": "Features", + "description": "Integer, known values are 0 (default) and 1 (turbo mode)." + } + } + }, + "light_set_scene": { + "name": "Light set scene", + "description": "Sets a fixed scene.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the light entity." + }, + "scene": { + "name": "Scene", + "description": "Number of the fixed scene." + } + } + }, + "light_set_delayed_turn_off": { + "name": "Light set delayed turn off", + "description": "Delayed turn off.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the light entity." + }, + "time_period": { + "name": "Time period", + "description": "Time period for the delayed turn off." + } + } + }, + "light_reminder_on": { + "name": "Light reminder on", + "description": "Enables the eye fatigue reminder/notification (EYECARE SMART LAMP 2 ONLY).", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the entity to act on." + } + } + }, + "light_reminder_off": { + "name": "Light reminder off", + "description": "Disables the eye fatigue reminder/notification (EYECARE SMART LAMP 2 ONLY).", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the entity to act on." + } + } + }, + "light_night_light_mode_on": { + "name": "Night light mode on", + "description": "Turns the eyecare mode on (EYECARE SMART LAMP 2 ONLY).", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the entity to act on." + } + } + }, + "light_night_light_mode_off": { + "name": "Night light mode off", + "description": "Turns the eyecare mode fan_set_dry_off (EYECARE SMART LAMP 2 ONLY).", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the entity to act on." + } + } + }, + "light_eyecare_mode_on": { + "name": "Light eyecare mode on", + "description": "Enables the eye fatigue reminder/notification (EYECARE SMART LAMP 2 ONLY).", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the entity to act on." + } + } + }, + "light_eyecare_mode_off": { + "name": "Light eyecare mode off", + "description": "Disables the eye fatigue reminder/notification (EYECARE SMART LAMP 2 ONLY).", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the entity to act on." + } + } + }, + "remote_learn_command": { + "name": "Remote learn command", + "description": "Learns an IR command, press \"Call Service\", point the remote at the IR device, and the learned command will be shown as a notification in Overview.", + "fields": { + "slot": { + "name": "Slot", + "description": "Define the slot used to save the IR command." + }, + "timeout": { + "name": "Timeout", + "description": "Define the timeout, before which the command must be learned." + } + } + }, + "remote_set_led_on": { + "name": "Remote set LED on", + "description": "Turns on blue LED." + }, + "remote_set_led_off": { + "name": "Remote set LED off", + "description": "Turns off blue LED." + }, + "switch_set_wifi_led_on": { + "name": "Switch set Wi-Fi LED on", + "description": "Turns the wifi led on.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the xiaomi miio entity." + } + } + }, + "switch_set_wifi_led_off": { + "name": "Switch set Wi-Fi LED off", + "description": "Turn the Wi-Fi led off.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the xiaomi miio entity." + } + } + }, + "switch_set_power_price": { + "name": "Switch set power price", + "description": "Sets the power price.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the xiaomi miio entity." + }, + "mode": { + "name": "Mode", + "description": "Power price." + } + } + }, + "switch_set_power_mode": { + "name": "Switch set power mode", + "description": "Sets the power mode.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the xiaomi miio entity." + }, + "mode": { + "name": "Mode", + "description": "Power mode." + } + } + }, + "vacuum_remote_control_start": { + "name": "Vacuum remote control start", + "description": "Starts remote control of the vacuum cleaner. You can then move it with `remote_control_move`, when done call `remote_control_stop`." + }, + "vacuum_remote_control_stop": { + "name": "Vacuum remote control stop", + "description": "Stops remote control mode of the vacuum cleaner." + }, + "vacuum_remote_control_move": { + "name": "Vacuum remote control move", + "description": "Remote controls the vacuum cleaner, make sure you first set it in remote control mode with `remote_control_start`.", + "fields": { + "velocity": { + "name": "Velocity", + "description": "Speed." + }, + "rotation": { + "name": "Rotation", + "description": "Rotation, between -179 degrees and 179 degrees." + }, + "duration": { + "name": "Duration", + "description": "Duration of the movement." + } + } + }, + "vacuum_remote_control_move_step": { + "name": "Vacuum remote control move step", + "description": "Remote controls the vacuum cleaner, only makes one move and then stops.", + "fields": { + "velocity": { + "name": "Velocity", + "description": "Speed." + }, + "rotation": { + "name": "Rotation", + "description": "Rotation." + }, + "duration": { + "name": "Duration", + "description": "Duration of the movement." + } + } + }, + "vacuum_clean_zone": { + "name": "Vacuum clean zone", + "description": "Starts the cleaning operation in the selected areas for the number of repeats indicated.", + "fields": { + "zone": { + "name": "Zone", + "description": "Array of zones. Each zone is an array of 4 integer values." + }, + "repeats": { + "name": "Repeats", + "description": "Number of cleaning repeats for each zone." + } + } + }, + "vacuum_goto": { + "name": "Vacuum go to", + "description": "Go to the specified coordinates.", + "fields": { + "x_coord": { + "name": "X coordinate", + "description": "X-coordinate." + }, + "y_coord": { + "name": "Y coordinate", + "description": "Y-coordinate." + } + } + }, + "vacuum_clean_segment": { + "name": "Vacuum clean segment", + "description": "Starts cleaning of the specified segment(s).", + "fields": { + "segments": { + "name": "Segments", + "description": "Segments." + } + } + } } } diff --git a/homeassistant/components/yamaha/services.yaml b/homeassistant/components/yamaha/services.yaml index 8d25d5925c1..705f2996a3c 100644 --- a/homeassistant/components/yamaha/services.yaml +++ b/homeassistant/components/yamaha/services.yaml @@ -1,49 +1,35 @@ enable_output: - name: Enable output - description: Enable or disable an output port target: entity: integration: yamaha domain: media_player fields: port: - name: Port - description: Name of port to enable/disable. required: true example: "hdmi1" selector: text: enabled: - name: Enabled - description: Indicate if port should be enabled or not. required: true selector: boolean: menu_cursor: - name: Menu cursor - description: Control the cursor in a menu target: entity: integration: yamaha domain: media_player fields: cursor: - name: Cursor - description: Name of the cursor key to press ('up', 'down', 'left', 'right', 'select', 'return') example: down selector: text: select_scene: - name: Select scene - description: "Select a scene on the receiver" target: entity: integration: yamaha domain: media_player fields: scene: - name: Scene - description: Name of the scene. Standard for RX-V437 is 'BD/DVD Movie Viewing', 'TV Viewing', 'NET Audio Listening' or 'Radio Listening' required: true example: "TV Viewing" selector: diff --git a/homeassistant/components/yamaha/strings.json b/homeassistant/components/yamaha/strings.json new file mode 100644 index 00000000000..0896f43b1b5 --- /dev/null +++ b/homeassistant/components/yamaha/strings.json @@ -0,0 +1,38 @@ +{ + "services": { + "enable_output": { + "name": "Enable output", + "description": "Enables or disables an output port.", + "fields": { + "port": { + "name": "Port", + "description": "Name of port to enable/disable." + }, + "enabled": { + "name": "Enabled", + "description": "Indicate if port should be enabled or not." + } + } + }, + "menu_cursor": { + "name": "Menu cursor", + "description": "Controls the cursor in a menu.", + "fields": { + "cursor": { + "name": "Cursor", + "description": "Name of the cursor key to press ('up', 'down', 'left', 'right', 'select', 'return')." + } + } + }, + "select_scene": { + "name": "Select scene", + "description": "Selects a scene on the receiver.", + "fields": { + "scene": { + "name": "Scene", + "description": "Name of the scene. Standard for RX-V437 is 'BD/DVD Movie Viewing', 'TV Viewing', 'NET Audio Listening' or 'Radio Listening'." + } + } + } + } +} diff --git a/homeassistant/components/yeelight/services.yaml b/homeassistant/components/yeelight/services.yaml index d7850b34607..ccfd46ef680 100644 --- a/homeassistant/components/yeelight/services.yaml +++ b/homeassistant/components/yeelight/services.yaml @@ -1,85 +1,60 @@ set_mode: - name: Set mode - description: Set a operation mode. target: entity: integration: yeelight domain: light fields: mode: - name: Mode - description: Operation mode. required: true selector: select: options: - - label: "Color Flow" - value: "color_flow" - - label: "HSV" - value: "hsv" - - label: "Last" - value: "last" - - label: "Moonlight" - value: "moonlight" - - label: "Normal" - value: "normal" - - label: "RGB" - value: "rgb" + - "color_flow" + - "hsv" + - "last" + - "moonlight" + - "normal" + - "rgb" + translation_key: mode set_color_scene: - name: Set color scene - description: Changes the light to the specified RGB color and brightness. If the light is off, it will be turned on. target: entity: integration: yeelight domain: light fields: rgb_color: - name: RGB color - description: Color for the light in RGB-format. example: "[255, 100, 100]" selector: object: brightness: - name: Brightness - description: The brightness value to set. selector: number: min: 0 max: 100 unit_of_measurement: "%" set_hsv_scene: - name: Set HSV scene - description: Changes the light to the specified HSV color and brightness. If the light is off, it will be turned on. target: entity: integration: yeelight domain: light fields: hs_color: - name: Hue/sat color - description: Color for the light in hue/sat format. Hue is 0-359 and Sat is 0-100. example: "[300, 70]" selector: object: brightness: - name: Brightness - description: The brightness value to set. selector: number: min: 0 max: 100 unit_of_measurement: "%" set_color_temp_scene: - name: Set color temperature scene - description: Changes the light to the specified color temperature. If the light is off, it will be turned on. target: entity: integration: yeelight domain: light fields: kelvin: - name: Kelvin - description: Color temperature for the light in Kelvin. selector: number: min: 1700 @@ -87,118 +62,90 @@ set_color_temp_scene: step: 100 unit_of_measurement: K brightness: - name: Brightness - description: The brightness value to set. selector: number: min: 0 max: 100 unit_of_measurement: "%" set_color_flow_scene: - name: Set color flow scene - description: starts a color flow. If the light is off, it will be turned on. target: entity: integration: yeelight domain: light fields: count: - name: Count - description: The number of times to run this flow (0 to run forever). default: 0 selector: number: min: 0 max: 100 action: - name: Action - description: The action to take after the flow stops. default: "recover" selector: select: options: - - label: "Off" - value: "off" - - label: "Recover" - value: "recover" - - label: "Stay" - value: "stay" + - "off" + - "recover" + - "stay" + translation_key: action transitions: - name: Transitions - description: Array of transitions, for desired effect. Examples https://yeelight.readthedocs.io/en/stable/flow.html - example: '[{ "TemperatureTransition": [1900, 1000, 80] }, { "TemperatureTransition": [1900, 1000, 10] }]' + example: + '[{ "TemperatureTransition": [1900, 1000, 80] }, { "TemperatureTransition": + [1900, 1000, 10] }]' selector: object: set_auto_delay_off_scene: - name: Set auto delay off scene - description: Turns the light on to the specified brightness and sets a timer to turn it back off after the given number of minutes. If the light is off, Set a color scene, if light is off, it will be turned on. target: entity: integration: yeelight domain: light fields: minutes: - name: Minutes - description: The time to wait before automatically turning the light off. selector: number: min: 1 max: 60 unit_of_measurement: minutes brightness: - name: Brightness - description: The brightness value to set. selector: number: min: 0 max: 100 unit_of_measurement: "%" start_flow: - name: Start flow - description: Start a custom flow, using transitions from https://yeelight.readthedocs.io/en/stable/yeelight.html#flow-objects target: entity: integration: yeelight domain: light fields: count: - name: Count - description: The number of times to run this flow (0 to run forever). default: 0 selector: number: min: 0 max: 100 action: - name: Action - description: The action to take after the flow stops. default: "recover" selector: select: options: - - label: "Off" - value: "off" - - label: "Recover" - value: "recover" - - label: "Stay" - value: "stay" + - "off" + - "recover" + - "stay" + translation_key: action transitions: - name: Transitions - description: Array of transitions, for desired effect. Examples https://yeelight.readthedocs.io/en/stable/flow.html - example: '[{ "TemperatureTransition": [1900, 1000, 80] }, { "TemperatureTransition": [1900, 1000, 10] }]' + example: + '[{ "TemperatureTransition": [1900, 1000, 80] }, { "TemperatureTransition": + [1900, 1000, 10] }]' selector: object: set_music_mode: - name: Set music mode - description: Enable or disable music_mode target: entity: integration: yeelight domain: light fields: music_mode: - name: Music mode - description: Use true or false to enable / disable music_mode required: true selector: boolean: diff --git a/homeassistant/components/yeelight/strings.json b/homeassistant/components/yeelight/strings.json index 0ecbd134b6a..18b762057a7 100644 --- a/homeassistant/components/yeelight/strings.json +++ b/homeassistant/components/yeelight/strings.json @@ -37,5 +37,138 @@ } } } + }, + "services": { + "set_mode": { + "name": "Set mode", + "description": "Sets a operation mode.", + "fields": { + "mode": { + "name": "Mode", + "description": "Operation mode." + } + } + }, + "set_color_scene": { + "name": "Set color scene", + "description": "Changes the light to the specified RGB color and brightness. If the light is off, it will be turned on.", + "fields": { + "rgb_color": { + "name": "RGB color", + "description": "Color for the light in RGB-format." + }, + "brightness": { + "name": "Brightness", + "description": "The brightness value to set." + } + } + }, + "set_hsv_scene": { + "name": "Set HSV scene", + "description": "Changes the light to the specified HSV color and brightness. If the light is off, it will be turned on.", + "fields": { + "hs_color": { + "name": "Hue/sat color", + "description": "Color for the light in hue/sat format. Hue is 0-359 and Sat is 0-100." + }, + "brightness": { + "name": "Brightness", + "description": "The brightness value to set." + } + } + }, + "set_color_temp_scene": { + "name": "Set color temperature scene", + "description": "Changes the light to the specified color temperature. If the light is off, it will be turned on.", + "fields": { + "kelvin": { + "name": "Kelvin", + "description": "Color temperature for the light in Kelvin." + }, + "brightness": { + "name": "Brightness", + "description": "The brightness value to set." + } + } + }, + "set_color_flow_scene": { + "name": "Set color flow scene", + "description": "Starts a color flow. If the light is off, it will be turned on.", + "fields": { + "count": { + "name": "Count", + "description": "The number of times to run this flow (0 to run forever)." + }, + "action": { + "name": "Action", + "description": "The action to take after the flow stops." + }, + "transitions": { + "name": "Transitions", + "description": "Array of transitions, for desired effect. Examples https://yeelight.readthedocs.io/en/stable/flow.html." + } + } + }, + "set_auto_delay_off_scene": { + "name": "Set auto delay off scene", + "description": "Turns the light on to the specified brightness and sets a timer to turn it back off after the given number of minutes. If the light is off, Set a color scene, if light is off, it will be turned on.", + "fields": { + "minutes": { + "name": "Minutes", + "description": "The time to wait before automatically turning the light off." + }, + "brightness": { + "name": "Brightness", + "description": "The brightness value to set." + } + } + }, + "start_flow": { + "name": "Start flow", + "description": "Start a custom flow, using transitions from https://yeelight.readthedocs.io/en/stable/yeelight.html#flow-objects.", + "fields": { + "count": { + "name": "Count", + "description": "The number of times to run this flow (0 to run forever)." + }, + "action": { + "name": "Action", + "description": "The action to take after the flow stops." + }, + "transitions": { + "name": "Transitions", + "description": "Array of transitions, for desired effect. Examples https://yeelight.readthedocs.io/en/stable/flow.html." + } + } + }, + "set_music_mode": { + "name": "Set music mode", + "description": "Enables or disables music_mode.", + "fields": { + "music_mode": { + "name": "Music mode", + "description": "Use true or false to enable / disable music_mode." + } + } + } + }, + "selector": { + "mode": { + "options": { + "color_flow": "Color Flow", + "hsv": "HSV", + "last": "Last", + "moonlight": "Moonlight", + "normal": "Normal", + "rgb": "RGB" + } + }, + "action": { + "options": { + "off": "Off", + "recover": "Recover", + "stay": "Stay" + } + } } } diff --git a/homeassistant/components/zoneminder/services.yaml b/homeassistant/components/zoneminder/services.yaml index 74ab0cf5945..30e6672957d 100644 --- a/homeassistant/components/zoneminder/services.yaml +++ b/homeassistant/components/zoneminder/services.yaml @@ -1,10 +1,6 @@ set_run_state: - name: Set run state - description: Set the ZoneMinder run state fields: name: - name: Name - description: The string name of the ZoneMinder run state to set as active. required: true example: "Home" selector: diff --git a/homeassistant/components/zoneminder/strings.json b/homeassistant/components/zoneminder/strings.json new file mode 100644 index 00000000000..1e2e41d2741 --- /dev/null +++ b/homeassistant/components/zoneminder/strings.json @@ -0,0 +1,14 @@ +{ + "services": { + "set_run_state": { + "name": "Set run state", + "description": "Sets the ZoneMinder run state.", + "fields": { + "name": { + "name": "Name", + "description": "The string name of the ZoneMinder run state to set as active." + } + } + } + } +}