From 24840b54ac14cb726e34a70755ccb5f7b2c070be Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sun, 5 Apr 2020 10:33:45 +0200 Subject: [PATCH] Add yamllint (in pre-commit and CI) (#33676) * Add yamllint (in pre-commit and CI) * Fix linting for all YAML files * Bump and add it to requirements * Fix gen_requirements for pre-commit, remove 'v' from version --- .github/lock.yml | 2 +- .pre-commit-config.yaml | 4 + .yamllint | 61 ++++++ azure-pipelines-ci.yml | 4 + codecov.yml | 6 +- homeassistant/components/abode/services.yaml | 16 +- homeassistant/components/arlo/services.yaml | 2 +- .../components/automation/services.yaml | 11 +- homeassistant/components/blink/services.yaml | 28 +-- .../components/bluesound/services.yaml | 10 +- .../bluetooth_tracker/services.yaml | 2 +- .../components/conversation/services.yaml | 3 - homeassistant/components/demo/services.yaml | 2 +- .../components/downloader/services.yaml | 10 +- homeassistant/components/dyson/services.yaml | 14 +- homeassistant/components/ebusd/services.yaml | 2 +- homeassistant/components/econet/services.yaml | 4 +- homeassistant/components/fan/services.yaml | 21 +-- .../components/fastdotcom/services.yaml | 2 +- homeassistant/components/ffmpeg/services.yaml | 15 +- .../components/foursquare/services.yaml | 50 +++-- homeassistant/components/google/services.yaml | 16 +- homeassistant/components/group/services.yaml | 3 +- .../components/habitica/services.yaml | 4 +- .../components/hangouts/services.yaml | 2 +- .../components/harmony/services.yaml | 6 +- .../components/hdmi_cec/services.yaml | 50 +++-- homeassistant/components/heos/services.yaml | 6 +- homeassistant/components/hive/services.yaml | 35 ++-- .../homematicip_cloud/services.yaml | 6 +- .../components/ihc/ihc_auto_setup.yaml | 173 +++++++++--------- homeassistant/components/ihc/services.yaml | 2 +- .../components/input_datetime/services.yaml | 20 +- .../components/input_number/services.yaml | 19 +- .../components/insteon/services.yaml | 10 +- homeassistant/components/iperf3/services.yaml | 2 +- homeassistant/components/lcn/services.yaml | 70 +++---- homeassistant/components/lifx/services.yaml | 6 +- .../components/logbook/services.yaml | 2 +- homeassistant/components/matrix/services.yaml | 4 +- .../components/media_extractor/services.yaml | 9 +- homeassistant/components/mill/services.yaml | 4 +- .../components/mysensors/services.yaml | 4 +- homeassistant/components/neato/services.yaml | 4 +- .../components/ness_alarm/services.yaml | 2 +- homeassistant/components/nexia/services.yaml | 4 +- .../components/nuimo_controller/services.yaml | 21 +-- homeassistant/components/ombi/services.yaml | 5 +- homeassistant/components/openuv/services.yaml | 2 - .../components/pi_hole/services.yaml | 4 +- .../components/qvr_pro/services.yaml | 4 +- .../components/rainmachine/services.yaml | 2 - .../remember_the_milk/services.yaml | 9 +- homeassistant/components/ring/services.yaml | 2 +- .../components/route53/services.yaml | 2 +- .../components/simplisafe/services.yaml | 2 - homeassistant/components/snips/services.yaml | 49 +++-- .../components/speedtestdotnet/services.yaml | 2 +- homeassistant/components/stream/services.yaml | 4 +- .../components/streamlabswater/services.yaml | 6 +- homeassistant/components/timer/services.yaml | 10 +- .../components/utility_meter/services.yaml | 12 +- homeassistant/components/vallox/services.yaml | 4 +- homeassistant/components/velbus/services.yaml | 4 +- homeassistant/components/vesync/services.yaml | 2 +- .../components/webostv/services.yaml | 26 +-- homeassistant/components/wink/services.yaml | 82 +++++---- .../components/xiaomi_miio/services.yaml | 110 +++++------ homeassistant/components/yamaha/services.yaml | 6 +- .../components/zoneminder/services.yaml | 2 +- homeassistant/components/zwave/services.yaml | 17 +- requirements_test_pre_commit.txt | 5 +- script/gen_requirements_all.py | 2 +- 73 files changed, 621 insertions(+), 507 deletions(-) create mode 100644 .yamllint diff --git a/.github/lock.yml b/.github/lock.yml index 93666bc6eeb..7ce0cc65619 100644 --- a/.github/lock.yml +++ b/.github/lock.yml @@ -24,4 +24,4 @@ only: pulls # Optionally, specify configuration settings just for `issues` or `pulls` issues: - daysUntilLock: 30 + daysUntilLock: 30 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4211438379c..20337d83631 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -46,6 +46,10 @@ repos: - --branch=dev - --branch=master - --branch=rc + - repo: https://github.com/adrienverge/yamllint.git + rev: v1.21.0 + hooks: + - id: yamllint - repo: local hooks: # Run mypy through our wrapper script in order to get the possible diff --git a/.yamllint b/.yamllint new file mode 100644 index 00000000000..c2f877a2b7a --- /dev/null +++ b/.yamllint @@ -0,0 +1,61 @@ +ignore: | + azure-*.yml +rules: + braces: + level: error + min-spaces-inside: 0 + max-spaces-inside: 1 + min-spaces-inside-empty: -1 + max-spaces-inside-empty: -1 + brackets: + level: error + min-spaces-inside: 0 + max-spaces-inside: 0 + min-spaces-inside-empty: -1 + max-spaces-inside-empty: -1 + colons: + level: error + max-spaces-before: 0 + max-spaces-after: 1 + commas: + level: error + max-spaces-before: 0 + min-spaces-after: 1 + max-spaces-after: 1 + comments: + level: error + require-starting-space: true + min-spaces-from-content: 2 + comments-indentation: + level: error + document-end: + level: error + present: false + document-start: + level: error + present: false + empty-lines: + level: error + max: 1 + max-start: 0 + max-end: 1 + hyphens: + level: error + max-spaces-after: 1 + indentation: + level: error + spaces: 2 + indent-sequences: true + check-multi-line-strings: false + key-duplicates: + level: error + line-length: disable + new-line-at-end-of-file: + level: error + new-lines: + level: error + type: unix + trailing-spaces: + level: error + truthy: + level: error diff --git a/azure-pipelines-ci.yml b/azure-pipelines-ci.yml index 8fb014f80a7..225c88b7b0f 100644 --- a/azure-pipelines-ci.yml +++ b/azure-pipelines-ci.yml @@ -64,6 +64,10 @@ stages: . venv/bin/activate pre-commit run check-json --all-files displayName: 'Run check-json' + - script: | + . venv/bin/activate + pre-commit run yamllint --all-files + displayName: 'Run yamllint' - job: 'Validate' pool: vmImage: 'ubuntu-latest' diff --git a/codecov.yml b/codecov.yml index 1455c20749a..964e2427fb1 100644 --- a/codecov.yml +++ b/codecov.yml @@ -12,8 +12,8 @@ coverage: default: url: "secret:TgWDUM4Jw0w7wMJxuxNF/yhSOHglIo1fGwInJnRLEVPy2P2aLimkoK1mtKCowH5TFw+baUXVXT3eAqefbdvIuM8BjRR4aRji95C6CYyD0QHy4N8i7nn1SQkWDPpS8IthYTg07rUDF7s5guurkKv2RrgoCdnnqjAMSzHoExMOF7xUmblMdhBTWJgBpWEhASJy85w/xxjlsE1xoTkzeJu9Q67pTXtRcn+5kb5/vIzPSYg=" comment: - require_changes: yes + require_changes: true layout: reach branches: - - master - - !dev + - master + - !dev diff --git a/homeassistant/components/abode/services.yaml b/homeassistant/components/abode/services.yaml index 5818cdc0048..f694afc0298 100644 --- a/homeassistant/components/abode/services.yaml +++ b/homeassistant/components/abode/services.yaml @@ -1,13 +1,21 @@ capture_image: description: Request a new image capture from a camera device. fields: - entity_id: {description: Entity id of the camera to request an image., example: camera.downstairs_motion_camera} + entity_id: + description: Entity id of the camera to request an image. + example: camera.downstairs_motion_camera change_setting: description: Change an Abode system setting. fields: - setting: {description: Setting to change., example: beeper_mute} - value: {description: Value of the setting., example: '1'} + setting: + description: Setting to change. + example: beeper_mute + value: + description: Value of the setting. + example: "1" trigger_automation: description: Trigger an Abode automation. fields: - entity_id: {description: Entity id of the automation to trigger., example: switch.my_automation} \ No newline at end of file + entity_id: + description: Entity id of the automation to trigger. + example: switch.my_automation diff --git a/homeassistant/components/arlo/services.yaml b/homeassistant/components/arlo/services.yaml index 773bee4430a..a35fec8fb73 100644 --- a/homeassistant/components/arlo/services.yaml +++ b/homeassistant/components/arlo/services.yaml @@ -1,4 +1,4 @@ # Describes the format for available arlo services update: - description: Update the state for all cameras and the base station. \ No newline at end of file + description: Update the state for all cameras and the base station. diff --git a/homeassistant/components/automation/services.yaml b/homeassistant/components/automation/services.yaml index ce54220aff4..867dc8e89cd 100644 --- a/homeassistant/components/automation/services.yaml +++ b/homeassistant/components/automation/services.yaml @@ -1,35 +1,34 @@ # Describes the format for available automation services - turn_on: description: Enable an automation. fields: entity_id: description: Name of the automation to turn on. - example: 'automation.notify_home' + example: "automation.notify_home" turn_off: description: Disable an automation. fields: entity_id: description: Name of the automation to turn off. - example: 'automation.notify_home' + example: "automation.notify_home" toggle: description: Toggle an automation. fields: entity_id: description: Name of the automation to toggle on/off. - example: 'automation.notify_home' + example: "automation.notify_home" trigger: description: Trigger the action of an automation. fields: entity_id: description: Name of the automation to trigger. - example: 'automation.notify_home' + example: "automation.notify_home" skip_condition: description: Whether or not the condition will be skipped (defaults to True). - example: True + example: true reload: description: Reload the automation configuration. diff --git a/homeassistant/components/blink/services.yaml b/homeassistant/components/blink/services.yaml index fc042b0d598..37595837c11 100644 --- a/homeassistant/components/blink/services.yaml +++ b/homeassistant/components/blink/services.yaml @@ -1,21 +1,21 @@ # Describes the format for available Blink services blink_update: - description: Force a refresh. + description: Force a refresh. trigger_camera: - description: Request named camera to take new image. - fields: - name: - description: Name of camera to take new image. - example: 'Living Room' + description: Request named camera to take new image. + fields: + name: + description: Name of camera to take new image. + example: "Living Room" save_video: - description: Save last recorded video clip to local file. - fields: - name: - description: Name of camera to grab video from. - example: 'Living Room' - filename: - description: Filename to writable path (directory may need to be included in whitelist_dirs in config) - example: '/tmp/video.mp4' + description: Save last recorded video clip to local file. + fields: + name: + description: Name of camera to grab video from. + example: "Living Room" + filename: + description: Filename to writable path (directory may need to be included in whitelist_dirs in config) + example: "/tmp/video.mp4" diff --git a/homeassistant/components/bluesound/services.yaml b/homeassistant/components/bluesound/services.yaml index 6c85c77e961..0ca12c9e2ae 100644 --- a/homeassistant/components/bluesound/services.yaml +++ b/homeassistant/components/bluesound/services.yaml @@ -3,28 +3,28 @@ join: fields: master: description: Entity ID of the player that should become the master of the group. - example: 'media_player.bluesound_livingroom' + example: "media_player.bluesound_livingroom" entity_id: description: Name(s) of entities that will coordinate the grouping. Platform dependent. - example: 'media_player.bluesound_livingroom' + example: "media_player.bluesound_livingroom" unjoin: description: Unjoin the player from a group. fields: entity_id: description: Name(s) of entities that will be unjoined from their group. Platform dependent. - example: 'media_player.bluesound_livingroom' + example: "media_player.bluesound_livingroom" set_sleep_timer: description: "Set a Bluesound timer. It will increase timer in steps: 15, 30, 45, 60, 90, 0" fields: entity_id: description: Name(s) of entities that will have a timer set. - example: 'media_player.bluesound_livingroom' + example: "media_player.bluesound_livingroom" clear_sleep_timer: description: Clear a Bluesound timer. fields: entity_id: description: Name(s) of entities that will have the timer cleared. - example: 'media_player.bluesound_livingroom' \ No newline at end of file + example: "media_player.bluesound_livingroom" diff --git a/homeassistant/components/bluetooth_tracker/services.yaml b/homeassistant/components/bluetooth_tracker/services.yaml index b48c48a8968..01b31eee63e 100644 --- a/homeassistant/components/bluetooth_tracker/services.yaml +++ b/homeassistant/components/bluetooth_tracker/services.yaml @@ -1,2 +1,2 @@ update: - description: Trigger manual tracker update \ No newline at end of file + description: Trigger manual tracker update diff --git a/homeassistant/components/conversation/services.yaml b/homeassistant/components/conversation/services.yaml index a1b980d8e05..032edba8db1 100644 --- a/homeassistant/components/conversation/services.yaml +++ b/homeassistant/components/conversation/services.yaml @@ -1,10 +1,7 @@ # Describes the format for available component services - process: description: Launch a conversation from a transcribed text. fields: text: description: Transcribed text example: Turn all lights on - - diff --git a/homeassistant/components/demo/services.yaml b/homeassistant/components/demo/services.yaml index a8a96b21c19..aed23eed95a 100644 --- a/homeassistant/components/demo/services.yaml +++ b/homeassistant/components/demo/services.yaml @@ -1,2 +1,2 @@ randomize_device_tracker_data: - description: Demonstrates using a device tracker to see where devices are located \ No newline at end of file + description: Demonstrates using a device tracker to see where devices are located diff --git a/homeassistant/components/downloader/services.yaml b/homeassistant/components/downloader/services.yaml index d16b2788c70..6e16e00432f 100644 --- a/homeassistant/components/downloader/services.yaml +++ b/homeassistant/components/downloader/services.yaml @@ -1,15 +1,15 @@ download_file: description: Downloads a file to the download location. fields: - url: + url: description: The URL of the file to download. - example: 'http://example.org/myfile' + example: "http://example.org/myfile" subdir: description: Download into subdirectory. - example: 'download_dir' + example: "download_dir" filename: description: Determine the filename. - example: 'my_file_name' + example: "my_file_name" overwrite: description: Whether to overwrite the file or not. - example: 'false' \ No newline at end of file + example: "false" diff --git a/homeassistant/components/dyson/services.yaml b/homeassistant/components/dyson/services.yaml index 1b59217f6ab..73f7bc75874 100644 --- a/homeassistant/components/dyson/services.yaml +++ b/homeassistant/components/dyson/services.yaml @@ -5,7 +5,7 @@ set_night_mode: fields: entity_id: description: Name(s) of the entities to enable/disable night mode - example: 'fan.living_room' + example: "fan.living_room" night_mode: description: Night mode status example: true @@ -15,7 +15,7 @@ set_auto_mode: fields: entity_id: description: Name(s) of the entities to enable/disable auto mode - example: 'fan.living_room' + example: "fan.living_room" auto_mode: description: Auto mode status example: true @@ -25,7 +25,7 @@ set_angle: fields: entity_id: description: Name(s) of the entities for which to set the angle - example: 'fan.living_room' + example: "fan.living_room" angle_low: description: The angle at which the oscillation should start example: 1 @@ -38,7 +38,7 @@ flow_direction_front: fields: entity_id: description: Name(s) of the entities to set frontal flow direction for - example: 'fan.living_room' + example: "fan.living_room" flow_direction_front: description: Frontal flow direction example: true @@ -48,7 +48,7 @@ set_timer: fields: entity_id: description: Name(s) of the entities to set the sleep timer for - example: 'fan.living_room' + example: "fan.living_room" timer: description: The value in minutes to set the timer to, 0 to disable it example: 30 @@ -58,7 +58,7 @@ set_speed: fields: entity_id: description: Name(s) of the entities to set the speed for - example: 'fan.living_room' + example: "fan.living_room" dyson_speed: description: Speed - example: 1 \ No newline at end of file + example: 1 diff --git a/homeassistant/components/ebusd/services.yaml b/homeassistant/components/ebusd/services.yaml index 0f64533f7f1..eee9896da10 100644 --- a/homeassistant/components/ebusd/services.yaml +++ b/homeassistant/components/ebusd/services.yaml @@ -3,4 +3,4 @@ write: fields: call: description: Property name and value to set - example: '{"name": "Hc1MaxFlowTempDesired", "value": 21}' \ No newline at end of file + example: '{"name": "Hc1MaxFlowTempDesired", "value": 21}' diff --git a/homeassistant/components/econet/services.yaml b/homeassistant/components/econet/services.yaml index 9f489165c22..b531764c290 100644 --- a/homeassistant/components/econet/services.yaml +++ b/homeassistant/components/econet/services.yaml @@ -3,7 +3,7 @@ add_vacation: fields: entity_id: description: Name(s) of entities to change. - example: 'water_heater.econet' + example: "water_heater.econet" start_date: description: The timestamp of when the vacation should start. (Optional, defaults to now) example: 1513186320 @@ -16,4 +16,4 @@ delete_vacation: fields: entity_id: description: Name(s) of entities to change. - example: 'water_heater.econet' \ No newline at end of file + example: "water_heater.econet" diff --git a/homeassistant/components/fan/services.yaml b/homeassistant/components/fan/services.yaml index 1fbd9089ed7..1fb88a36d2c 100644 --- a/homeassistant/components/fan/services.yaml +++ b/homeassistant/components/fan/services.yaml @@ -1,55 +1,54 @@ # Describes the format for available fan services - set_speed: description: Sets fan speed. fields: entity_id: description: Name(s) of the entities to set - example: 'fan.living_room' + example: "fan.living_room" speed: description: Speed setting - example: 'low' + example: "low" turn_on: description: Turns fan on. fields: entity_id: description: Names(s) of the entities to turn on - example: 'fan.living_room' + example: "fan.living_room" speed: description: Speed setting - example: 'high' + example: "high" turn_off: description: Turns fan off. fields: entity_id: description: Names(s) of the entities to turn off - example: 'fan.living_room' + example: "fan.living_room" oscillate: description: Oscillates the fan. fields: entity_id: description: Name(s) of the entities to oscillate - example: 'fan.desk_fan' + example: "fan.desk_fan" oscillating: description: Flag to turn on/off oscillation - example: True + example: true toggle: description: Toggle the fan on/off. fields: entity_id: description: Name(s) of the entities to toggle - example: 'fan.living_room' + example: "fan.living_room" set_direction: description: Set the fan rotation. fields: entity_id: description: Name(s) of the entities to set - example: 'fan.living_room' + example: "fan.living_room" direction: description: The direction to rotate. Either 'forward' or 'reverse' - example: 'forward' + example: "forward" diff --git a/homeassistant/components/fastdotcom/services.yaml b/homeassistant/components/fastdotcom/services.yaml index fe6cb1ac12d..f0afb49dbe0 100644 --- a/homeassistant/components/fastdotcom/services.yaml +++ b/homeassistant/components/fastdotcom/services.yaml @@ -1,2 +1,2 @@ speedtest: - description: Immediately take a speedest with Fast.com \ No newline at end of file + description: Immediately take a speedest with Fast.com diff --git a/homeassistant/components/ffmpeg/services.yaml b/homeassistant/components/ffmpeg/services.yaml index 05c9c4fb180..15afa82ed0a 100644 --- a/homeassistant/components/ffmpeg/services.yaml +++ b/homeassistant/components/ffmpeg/services.yaml @@ -1,15 +1,18 @@ restart: description: Send a restart command to a ffmpeg based sensor. fields: - entity_id: {description: Name(s) of entities that will restart. Platform dependent., - example: binary_sensor.ffmpeg_noise} + entity_id: + description: Name(s) of entities that will restart. Platform dependent. + example: binary_sensor.ffmpeg_noise start: description: Send a start command to a ffmpeg based sensor. fields: - entity_id: {description: Name(s) of entities that will start. Platform dependent., - example: binary_sensor.ffmpeg_noise} + entity_id: + description: Name(s) of entities that will start. Platform dependent. + example: binary_sensor.ffmpeg_noise stop: description: Send a stop command to a ffmpeg based sensor. fields: - entity_id: {description: Name(s) of entities that will stop. Platform dependent., - example: binary_sensor.ffmpeg_noise} + entity_id: + description: Name(s) of entities that will stop. Platform dependent. + example: binary_sensor.ffmpeg_noise diff --git a/homeassistant/components/foursquare/services.yaml b/homeassistant/components/foursquare/services.yaml index 3d15a9583f6..0fcc077c7d3 100644 --- a/homeassistant/components/foursquare/services.yaml +++ b/homeassistant/components/foursquare/services.yaml @@ -1,29 +1,45 @@ checkin: description: Check a user into a Foursquare venue. fields: - alt: {description: 'Altitude of the user''s location, in meters. [Optional]', - example: 0} - altAcc: {description: 'Vertical accuracy of the user''s location, in meters.', - example: 1} - broadcast: {description: 'Who to broadcast this check-in to. Accepts a comma-delimited + alt: + description: Altitude of the user's location, in meters. [Optional] + example: 0 + altAcc: + description: Vertical accuracy of the user's location, in meters. + example: 1 + broadcast: + description: >- + Who to broadcast this check-in to. Accepts a comma-delimited list of values: private (off the grid) or public (share with friends), facebook share on facebook, twitter share on twitter, followers share with followers (celebrity mode users only), If no valid value is found, the default is public. - [Optional]', example: 'public,twitter'} - eventId: {description: 'The event the user is checking in to. [Optional]', example: UHR8THISVNT} - ll: {description: 'Latitude and longitude of the user''s location. Only specify + [Optional] + example: "public,twitter" + eventId: + description: The event the user is checking in to. [Optional] + example: UHR8THISVNT + ll: + description: >- + Latitude and longitude of the user's location. Only specify this field if you have a GPS or other device reported location for the user - at the time of check-in. [Optional]', example: '33.7,44.2'} - llAcc: {description: 'Accuracy of the user''s latitude and longitude, in meters. - [Optional]', example: 1} - mentions: {description: 'Mentions in your check-in. This parameter is a semicolon-delimited + at the time of check-in. [Optional] + example: "33.7,44.2" + llAcc: + description: Accuracy of the user's latitude and longitude, in meters. [Optional] + example: 1 + mentions: + description: >- + Mentions in your check-in. This parameter is a semicolon-delimited list of mentions. A single mention is of the form "start,end,userid", where start is the index of the first character in the shout representing the mention, end is the index of the first character in the shout after the mention, and userid is the userid of the user being mentioned. If userid is prefixed with "fbu-", this indicates a Facebook userid that is being mention. Character - indices in shouts are 0-based. [Optional]', example: '5,10,HZXXY3Y;15,20,GZYYZ3Z;25,30,fbu-GZXY13Y'} - shout: {description: 'A message about your check-in. The maximum length of this - field is 140 characters. [Optional]', example: There are crayons! Crayons!} - venueId: {description: 'The Foursquare venue where the user is checking in. [Required]', - example: IHR8THISVNU} + indices in shouts are 0-based. [Optional] + example: "5,10,HZXXY3Y;15,20,GZYYZ3Z;25,30,fbu-GZXY13Y" + shout: + description: A message about your check-in. The maximum length of this field is 140 characters. [Optional] + example: There are crayons! Crayons! + venueId: + description: The Foursquare venue where the user is checking in. [Required] + example: IHR8THISVNU diff --git a/homeassistant/components/google/services.yaml b/homeassistant/components/google/services.yaml index 048e886dc4e..702b8347676 100644 --- a/homeassistant/components/google/services.yaml +++ b/homeassistant/components/google/services.yaml @@ -7,25 +7,25 @@ add_event: fields: calendar_id: description: The id of the calendar you want. - example: 'Your email' + example: "Your email" summary: description: Acts as the title of the event. - example: 'Bowling' + example: "Bowling" description: description: The description of the event. Optional. - example: 'Birthday bowling' + example: "Birthday bowling" start_date_time: description: The date and time the event should start. - example: '2019-03-22 20:00:00' + example: "2019-03-22 20:00:00" end_date_time: description: The date and time the event should end. - example: '2019-03-22 22:00:00' + example: "2019-03-22 22:00:00" start_date: description: The date the whole day event should start. - example: '2019-03-10' + example: "2019-03-10" end_date: description: The date the whole day event should end. - example: '2019-03-11' + example: "2019-03-11" in: description: Days or weeks that you want to create the event in. - example: '"days": 2 or "weeks": 2' \ No newline at end of file + example: '"days": 2 or "weeks": 2' diff --git a/homeassistant/components/group/services.yaml b/homeassistant/components/group/services.yaml index 98b0cef69c3..cec4f187ca6 100644 --- a/homeassistant/components/group/services.yaml +++ b/homeassistant/components/group/services.yaml @@ -1,5 +1,4 @@ # Describes the format for available group services - reload: description: Reload group configuration. @@ -23,7 +22,7 @@ set: example: domain.entity_id1, domain.entity_id2 all: description: Enable this option if the group should only turn on when all entities are on. - example: True + example: true remove: description: Remove a user group. diff --git a/homeassistant/components/habitica/services.yaml b/homeassistant/components/habitica/services.yaml index a063b1577f5..20794b4c47b 100644 --- a/homeassistant/components/habitica/services.yaml +++ b/homeassistant/components/habitica/services.yaml @@ -1,12 +1,10 @@ # Describes the format for Habitica service - ---- api_call: description: Call Habitica api fields: name: description: Habitica's username to call for - example: 'xxxNotAValidNickxxx' + example: "xxxNotAValidNickxxx" path: description: "Items from API URL in form of an array with method attached at the end. Consult https://habitica.com/apidoc/. Example uses https://habitica.com/apidoc/#api-Task-CreateUserTasks" example: '["tasks", "user", "post"]' diff --git a/homeassistant/components/hangouts/services.yaml b/homeassistant/components/hangouts/services.yaml index 26a7193493b..ff11762235d 100644 --- a/homeassistant/components/hangouts/services.yaml +++ b/homeassistant/components/hangouts/services.yaml @@ -15,4 +15,4 @@ send_message: example: '{ "image_file": "file" } or { "image_url": "url" }' reconnect: - description: Reconnect the bot. \ No newline at end of file + description: Reconnect the bot. diff --git a/homeassistant/components/harmony/services.yaml b/homeassistant/components/harmony/services.yaml index 1b9ae225c7f..f20f0494a5f 100644 --- a/homeassistant/components/harmony/services.yaml +++ b/homeassistant/components/harmony/services.yaml @@ -3,14 +3,14 @@ sync: fields: entity_id: description: Name(s) of entities to sync. - example: 'remote.family_room' + example: "remote.family_room" change_channel: description: Sends change channel command to the Harmony HUB fields: entity_id: description: Name(s) of Harmony remote entities to send change channel command to - example: 'remote.family_room' + example: "remote.family_room" channel: description: Channel number to change to - example: '200' \ No newline at end of file + example: "200" diff --git a/homeassistant/components/hdmi_cec/services.yaml b/homeassistant/components/hdmi_cec/services.yaml index 63aee668062..256b26c00c7 100644 --- a/homeassistant/components/hdmi_cec/services.yaml +++ b/homeassistant/components/hdmi_cec/services.yaml @@ -1,32 +1,44 @@ -power_on: {description: Power on all devices which supports it.} +power_on: { description: Power on all devices which supports it. } select_device: description: Select HDMI device. fields: - device: {description: 'Address of device to select. Can be entity_id, physical - address or alias from configuration.', example: '"switch.hdmi_1" or "1.1.0.0" - or "01:10"'} + device: + description: Address of device to select. Can be entity_id, physical address or alias from configuration. + example: '"switch.hdmi_1" or "1.1.0.0" or "01:10"' send_command: description: Sends CEC command into HDMI CEC capable adapter. fields: att: description: Optional parameters. example: [0, 2] - cmd: {description: 'Command itself. Could be decimal number or string with hexadeximal - notation: "0x10".', example: 144 or "0x90"} - dst: {description: 'Destination for command. Could be decimal number or string - with hexadeximal notation: "0x10".', example: 5 or "0x5"} - raw: {description: 'Raw CEC command in format "00:00:00:00" where first two digits + cmd: + description: 'Command itself. Could be decimal number or string with hexadeximal notation: "0x10".' + example: 144 or "0x90" + dst: + description: 'Destination for command. Could be decimal number or string with hexadeximal notation: "0x10".' + example: 5 or "0x5" + raw: + description: >- + Raw CEC command in format "00:00:00:00" where first two digits are source and destination, second byte is command and optional other bytes - are command parameters. If raw command specified, other params are ignored.', - example: '"10:36"'} - src: {description: 'Source of command. Could be decimal number or string with - hexadeximal notation: "0x10".', example: 12 or "0xc"} -standby: {description: Standby all devices which supports it.} -update: {description: Update devices state from network.} + are command parameters. If raw command specified, other params are ignored. + example: '"10:36"' + src: + description: 'Source of command. Could be decimal number or string with hexadeximal notation: "0x10".' + example: 12 or "0xc" +standby: + description: Standby all devices which supports it. +update: + description: Update devices state from network. volume: description: Increase or decrease volume of system. fields: - down: {description: Decreases volume x levels., example: 3} - mute: {description: 'Mutes audio system. Value should be on, off or toggle.', - example: toggle} - up: {description: Increases volume x levels., example: 3} + down: + description: Decreases volume x levels. + example: 3 + mute: + description: Mutes audio system. Value should be on, off or toggle. + example: toggle + up: + description: Increases volume x levels. + example: 3 diff --git a/homeassistant/components/heos/services.yaml b/homeassistant/components/heos/services.yaml index 8274240368f..0fe0518323f 100644 --- a/homeassistant/components/heos/services.yaml +++ b/homeassistant/components/heos/services.yaml @@ -3,10 +3,10 @@ sign_in: fields: username: description: The username or email of the HEOS account. [Required] - example: 'example@example.com' + example: "example@example.com" password: description: The password of the HEOS account. [Required] - example: 'password' + example: "password" sign_out: - description: Sign the controller out of the HEOS account. \ No newline at end of file + description: Sign the controller out of the HEOS account. diff --git a/homeassistant/components/hive/services.yaml b/homeassistant/components/hive/services.yaml index 6513d76ca89..f09baea7655 100644 --- a/homeassistant/components/hive/services.yaml +++ b/homeassistant/components/hive/services.yaml @@ -1,27 +1,24 @@ boost_heating: - description: "Set the boost mode ON defining the period of time and the desired target temperature - for the boost." + description: Set the boost mode ON defining the period of time and the desired target temperature for the boost. fields: entity_id: - { - description: Enter the entity_id for the device required to set the boost mode., - example: "climate.heating", - } + description: Enter the entity_id for the device required to set the boost mode. + example: "climate.heating" time_period: - { description: Set the time period for the boost., example: "01:30:00" } + description: Set the time period for the boost. + example: "01:30:00" temperature: - { - description: Set the target temperature for the boost period., - example: "20.5", - } + description: Set the target temperature for the boost period. + example: "20.5" boost_hot_water: - description: - "Set the boost mode ON or OFF defining the period of time for the boost." + description: "Set the boost mode ON or OFF defining the period of time for the boost." fields: entity_id: - { - description: Enter the entity_id for the device reuired to set the boost mode., - example: "water_heater.hot_water", - } - time_period: { description: Set the time period for the boost., example: "01:30:00" } - on_off: { description: Set the boost function on or off., example: "on" } + description: Enter the entity_id for the device reuired to set the boost mode. + example: "water_heater.hot_water" + time_period: + description: Set the time period for the boost. + example: "01:30:00" + on_off: + description: Set the boost function on or off. + example: "on" diff --git a/homeassistant/components/homematicip_cloud/services.yaml b/homeassistant/components/homematicip_cloud/services.yaml index 750528eddf8..20447e496f7 100644 --- a/homeassistant/components/homematicip_cloud/services.yaml +++ b/homeassistant/components/homematicip_cloud/services.yaml @@ -62,13 +62,13 @@ dump_hap_config: fields: config_output_path: description: (Default is 'Your home-assistant config directory') Path where to store the config. - example: '/config' + example: "/config" config_output_file_prefix: description: (Default is 'hmip-config') Name of the config file. The SGTIN of the AP will always be appended. - example: 'hmip-config' + example: "hmip-config" anonymize: description: (Default is True) Should the Configuration be anonymized? - example: True + example: true reset_energy_counter: description: Reset the energy counter of a measuring entity. diff --git a/homeassistant/components/ihc/ihc_auto_setup.yaml b/homeassistant/components/ihc/ihc_auto_setup.yaml index 6b5003a04b5..d5f8d26e2b7 100644 --- a/homeassistant/components/ihc/ihc_auto_setup.yaml +++ b/homeassistant/components/ihc/ihc_auto_setup.yaml @@ -3,96 +3,95 @@ # folder and make your changes. binary_sensor: - # Magnet contact - - xpath: './/product_dataline[@product_identifier="_0x2109"]' - node: 'dataline_input' - type: 'opening' - inverting: True - # Pir sensors - - xpath: './/product_dataline[@product_identifier="_0x210e"]' - node: 'dataline_input[1]' - type: 'motion' - # Pir sensors twilight sensor - - xpath: './/product_dataline[@product_identifier="_0x0"]' - node: 'dataline_input[1]' - type: 'motion' - # Pir sensors alarm - - xpath: './/product_dataline[@product_identifier="_0x210f"]' - node: 'dataline_input' - type: 'motion' - # Smoke detector - - xpath: './/product_dataline[@product_identifier="_0x210a"]' - node: 'dataline_input' - type: 'smoke' - # leak detector - - xpath: './/product_dataline[@product_identifier="_0x210c"]' - node: 'dataline_input' - type: 'moisture' - # light detector - - xpath: './/product_dataline[@product_identifier="_0x2110"]' - node: 'dataline_input' - type: 'light' + # Magnet contact + - xpath: './/product_dataline[@product_identifier="_0x2109"]' + node: "dataline_input" + type: "opening" + inverting: true + # Pir sensors + - xpath: './/product_dataline[@product_identifier="_0x210e"]' + node: "dataline_input[1]" + type: "motion" + # Pir sensors twilight sensor + - xpath: './/product_dataline[@product_identifier="_0x0"]' + node: "dataline_input[1]" + type: "motion" + # Pir sensors alarm + - xpath: './/product_dataline[@product_identifier="_0x210f"]' + node: "dataline_input" + type: "motion" + # Smoke detector + - xpath: './/product_dataline[@product_identifier="_0x210a"]' + node: "dataline_input" + type: "smoke" + # leak detector + - xpath: './/product_dataline[@product_identifier="_0x210c"]' + node: "dataline_input" + type: "moisture" + # light detector + - xpath: './/product_dataline[@product_identifier="_0x2110"]' + node: "dataline_input" + type: "light" light: - # Wireless Combi dimmer 4 buttons - - xpath: './/product_airlink[@product_identifier="_0x4406"]' - node: 'airlink_dimming' - dimmable: True - # Wireless Lamp outlet dimmer - - xpath: './/product_airlink[@product_identifier="_0x4304"]' - node: 'airlink_dimming' - dimmable: True - # Wireless universal dimmer - - xpath: './/product_airlink[@product_identifier="_0x4306"]' - node: 'airlink_dimming' - dimmable: True - # Wireless Lamp outlet relay - - xpath: './/product_airlink[@product_identifier="_0x4202"]' - node: 'airlink_relay' - # Wireless Combi relay 4 buttons - - xpath: './/product_airlink[@product_identifier="_0x4404"]' - node: 'airlink_relay' - # Dataline Lamp outlet - - xpath: './/product_dataline[@product_identifier="_0x2202"]' - node: 'dataline_output' - # Mobile Wireless dimmer - - xpath: './/product_airlink[@product_identifier="_0x4303"]' - node: 'airlink_dimming' - dimmable: True + # Wireless Combi dimmer 4 buttons + - xpath: './/product_airlink[@product_identifier="_0x4406"]' + node: "airlink_dimming" + dimmable: true + # Wireless Lamp outlet dimmer + - xpath: './/product_airlink[@product_identifier="_0x4304"]' + node: "airlink_dimming" + dimmable: true + # Wireless universal dimmer + - xpath: './/product_airlink[@product_identifier="_0x4306"]' + node: "airlink_dimming" + dimmable: true + # Wireless Lamp outlet relay + - xpath: './/product_airlink[@product_identifier="_0x4202"]' + node: "airlink_relay" + # Wireless Combi relay 4 buttons + - xpath: './/product_airlink[@product_identifier="_0x4404"]' + node: "airlink_relay" + # Dataline Lamp outlet + - xpath: './/product_dataline[@product_identifier="_0x2202"]' + node: "dataline_output" + # Mobile Wireless dimmer + - xpath: './/product_airlink[@product_identifier="_0x4303"]' + node: "airlink_dimming" + dimmable: true sensor: - # Temperature sensor - - xpath: './/product_dataline[@product_identifier="_0x2124"]' - node: 'resource_temperature' - unit_of_measurement: '°C' - # Humidity/temperature - - xpath: './/product_dataline[@product_identifier="_0x2135"]' - node: 'resource_humidity_level' - unit_of_measurement: '%' - # Humidity/temperature - - xpath: './/product_dataline[@product_identifier="_0x2135"]' - node: 'resource_temperature' - unit_of_measurement: '°C' - # Lux/temperature - - xpath: './/product_dataline[@product_identifier="_0x2136"]' - node: 'resource_light' - unit_of_measurement: 'Lux' - # Lux/temperature - - xpath: './/product_dataline[@product_identifier="_0x2136"]' - node: 'resource_temperature' - unit_of_measurement: '°C' + # Temperature sensor + - xpath: './/product_dataline[@product_identifier="_0x2124"]' + node: "resource_temperature" + unit_of_measurement: "°C" + # Humidity/temperature + - xpath: './/product_dataline[@product_identifier="_0x2135"]' + node: "resource_humidity_level" + unit_of_measurement: "%" + # Humidity/temperature + - xpath: './/product_dataline[@product_identifier="_0x2135"]' + node: "resource_temperature" + unit_of_measurement: "°C" + # Lux/temperature + - xpath: './/product_dataline[@product_identifier="_0x2136"]' + node: "resource_light" + unit_of_measurement: "Lux" + # Lux/temperature + - xpath: './/product_dataline[@product_identifier="_0x2136"]' + node: "resource_temperature" + unit_of_measurement: "°C" switch: - # Wireless Plug outlet - - xpath: './/product_airlink[@product_identifier="_0x4201"]' - node: 'airlink_relay' - # Dataline universal relay - - xpath: './/product_airlink[@product_identifier="_0x4203"]' - node: 'airlink_relay' - # Dataline plug outlet - - xpath: './/product_dataline[@product_identifier="_0x2201"]' - node: 'dataline_output' - # Wireless mobile relay - - xpath: './/product_airlink[@product_identifier="_0x4204"]' - node: 'airlink_relay' - + # Wireless Plug outlet + - xpath: './/product_airlink[@product_identifier="_0x4201"]' + node: "airlink_relay" + # Dataline universal relay + - xpath: './/product_airlink[@product_identifier="_0x4203"]' + node: "airlink_relay" + # Dataline plug outlet + - xpath: './/product_dataline[@product_identifier="_0x2201"]' + node: "dataline_output" + # Wireless mobile relay + - xpath: './/product_airlink[@product_identifier="_0x4204"]' + node: "airlink_relay" diff --git a/homeassistant/components/ihc/services.yaml b/homeassistant/components/ihc/services.yaml index 0a78c45d7b2..ad41539162c 100644 --- a/homeassistant/components/ihc/services.yaml +++ b/homeassistant/components/ihc/services.yaml @@ -28,4 +28,4 @@ pulse: description: Pulses an input on the IHC controller. fields: ihc_id: - description: The integer IHC resource ID. \ No newline at end of file + description: The integer IHC resource ID. diff --git a/homeassistant/components/input_datetime/services.yaml b/homeassistant/components/input_datetime/services.yaml index 4c5c998d0a5..26b2d088aea 100644 --- a/homeassistant/components/input_datetime/services.yaml +++ b/homeassistant/components/input_datetime/services.yaml @@ -1,14 +1,18 @@ set_datetime: description: This can be used to dynamically set the date and/or time. fields: - entity_id: {description: Entity id of the input datetime to set the new value., - example: input_datetime.test_date_time} - date: {description: The target date the entity should be set to. Do not use with datetime., - example: '"2019-04-20"'} - time: {description: The target time the entity should be set to. Do not use with datetime., - example: '"05:04:20"'} - datetime: {description: The target date & time the entity should be set to. Do not use with date or time., - example: '"2019-04-20 05:04:20"'} + entity_id: + description: Entity id of the input datetime to set the new value. + example: input_datetime.test_date_time + date: + description: The target date the entity should be set to. Do not use with datetime. + example: '"2019-04-20"' + time: + description: The target time the entity should be set to. Do not use with datetime. + example: '"05:04:20"' + datetime: + description: The target date & time the entity should be set to. Do not use with date or time. + example: '"2019-04-20 05:04:20"' reload: description: Reload the input_datetime configuration. diff --git a/homeassistant/components/input_number/services.yaml b/homeassistant/components/input_number/services.yaml index 9cd1b913ccd..76526b73e92 100644 --- a/homeassistant/components/input_number/services.yaml +++ b/homeassistant/components/input_number/services.yaml @@ -1,18 +1,23 @@ decrement: description: Decrement the value of an input number entity by its stepping. fields: - entity_id: {description: Entity id of the input number the should be decremented., - example: input_number.threshold} + entity_id: + description: Entity id of the input number the should be decremented. + example: input_number.threshold increment: description: Increment the value of an input number entity by its stepping. fields: - entity_id: {description: Entity id of the input number the should be incremented., - example: input_number.threshold} + entity_id: + description: Entity id of the input number the should be incremented. + example: input_number.threshold set_value: description: Set the value of an input number entity. fields: - entity_id: {description: Entity id of the input number to set the new value., - example: input_number.threshold} - value: {description: The target value the entity should be set to., example: 42} + entity_id: + description: Entity id of the input number to set the new value. + example: input_number.threshold + value: + description: The target value the entity should be set to. + example: 42 reload: description: Reload the input_number configuration. diff --git a/homeassistant/components/insteon/services.yaml b/homeassistant/components/insteon/services.yaml index 9c8d3237114..3d232569e9c 100644 --- a/homeassistant/components/insteon/services.yaml +++ b/homeassistant/components/insteon/services.yaml @@ -6,7 +6,7 @@ add_all_link: example: 1 mode: description: Linking mode controller - IM is controller responder - IM is responder - example: 'controller' + example: "controller" delete_all_link: description: Tells the Insteon Modem (IM) to remove an All-Link record from the All-Link Database of the IM and a device. Once the IM is set to delete the link, press the link button on the corresponding device to complete the process. fields: @@ -18,16 +18,16 @@ load_all_link_database: fields: entity_id: description: Name of the device to load. Use "all" to load the database of all devices. - example: 'light.1a2b3c' + example: "light.1a2b3c" reload: description: Reload all records. If true the current records are cleared from memory (does not effect the device) and the records are reloaded. If false the existing records are left in place and only missing records are added. Default is false. - example: 'true' + example: "true" print_all_link_database: description: Print the All-Link Database for a device. Requires that the All-Link Database is loaded into memory. fields: entity_id: description: Name of the device to print - example: 'light.1a2b3c' + example: "light.1a2b3c" print_im_all_link_database: description: Print the All-Link Database for the INSTEON Modem (IM). x10_all_units_off: @@ -59,4 +59,4 @@ scene_off: fields: group: description: INSTEON group or scene number - example: 26 \ No newline at end of file + example: 26 diff --git a/homeassistant/components/iperf3/services.yaml b/homeassistant/components/iperf3/services.yaml index c333d7c74c8..a3f645f5085 100644 --- a/homeassistant/components/iperf3/services.yaml +++ b/homeassistant/components/iperf3/services.yaml @@ -3,4 +3,4 @@ speedtest: fields: host: description: The host name of the iperf3 server (already configured) to run a test with. - example: 'iperf.he.net' \ No newline at end of file + example: "iperf.he.net" diff --git a/homeassistant/components/lcn/services.yaml b/homeassistant/components/lcn/services.yaml index 80c636577f8..89fe884fa9a 100644 --- a/homeassistant/components/lcn/services.yaml +++ b/homeassistant/components/lcn/services.yaml @@ -5,7 +5,7 @@ output_abs: fields: address: description: Module address - example: 'myhome.s0.m7' + example: "myhome.s0.m7" output: description: Output port example: "output1" @@ -21,7 +21,7 @@ output_rel: fields: address: description: Module address - example: 'myhome.s0.m7' + example: "myhome.s0.m7" output: description: Output port example: "output1" @@ -37,7 +37,7 @@ output_toggle: fields: address: description: Module address - example: 'myhome.s0.m7' + example: "myhome.s0.m7" output: description: Output port example: "output1" @@ -50,7 +50,7 @@ relays: fields: address: description: Module address - example: 'myhome.s0.m7' + example: "myhome.s0.m7" state: description: Relays states as string (1=on, 2=off, t=toggle, -=nochange) example: "t---001-" @@ -60,16 +60,16 @@ led: fields: address: description: Module address - example: 'myhome.s0.m7' + example: "myhome.s0.m7" led: description: Led example: "led6" state: description: Led state - example: 'blink' + example: "blink" values: - - on - - off + - "on" + - "off" - blink - flicker @@ -78,45 +78,45 @@ var_abs: fields: address: description: Module address - example: 'myhome.s0.m7' + example: "myhome.s0.m7" variable: description: Variable or setpoint name - example: 'var1' + example: "var1" value: description: Value to set - example: '50' + example: "50" unit_of_measurement: description: Unit of value - example: 'celsius' + example: "celsius" var_reset: description: Reset value of variable or setpoint. fields: address: description: Module address - example: 'myhome.s0.m7' + example: "myhome.s0.m7" variable: description: Variable or setpoint name - example: 'var1' + example: "var1" var_rel: description: Shift value of a variable, setpoint or threshold. fields: address: description: Module address - example: 'myhome.s0.m7' + example: "myhome.s0.m7" variable: description: Variable or setpoint name - example: 'var1' + example: "var1" value: description: Shift value - example: '50' + example: "50" unit_of_measurement: description: Unit of value - example: 'celsius' + example: "celsius" value_reference: description: Reference value (current or programmed) for setpoint and threshold - example: 'current' + example: "current" values: - current - prog @@ -126,10 +126,10 @@ lock_regulator: fields: address: description: Module address - example: 'myhome.s0.m7' + example: "myhome.s0.m7" setpoint: description: Setpoint name - example: 'r1varsetpoint' + example: "r1varsetpoint" state: description: New setpoint state example: true @@ -139,13 +139,13 @@ send_keys: fields: address: description: Module address - example: 'myhome.s0.m7' + example: "myhome.s0.m7" keys: description: Keys to send - example: 'a1a5d8' + example: "a1a5d8" state: - description: 'Key state upon sending (optional, must be hit for deferred)' - example: 'hit' + description: "Key state upon sending (optional, must be hit for deferred)" + example: "hit" values: - hit - make @@ -155,46 +155,46 @@ send_keys: example: 10 time_unit: description: Time unit of send delay (optional) - example: 's' + example: "s" lock_keys: description: Lock keys. fields: address: description: Module address - example: 'myhome.s0.m7' + example: "myhome.s0.m7" table: - description: 'Table with keys to lock (optional, must be A for interval).' - example: 'A5' + description: "Table with keys to lock (optional, must be A for interval)." + example: "A5" state: description: Key lock states as string (1=on, 2=off, T=toggle, -=nochange) - example: '1---t0--' + example: "1---t0--" time: description: Lock interval (optional) example: 10 time_unit: description: Time unit of lock interval (optional) - example: 's' + example: "s" dyn_text: description: Send dynamic text to LCN-GTxD displays. fields: address: description: Module address - example: 'myhome.s0.m7' + example: "myhome.s0.m7" row: description: Text row 1..4 (support of 4 independent text rows) example: 1 text: description: Text to send (up to 60 characters encoded as UTF-8) - example: 'text up to 60 characters' + example: "text up to 60 characters" pck: description: Send arbitrary PCK command. fields: address: description: Module address - example: 'myhome.s0.m7' + example: "myhome.s0.m7" pck: description: PCK command (without address header) - example: 'PIN4' + example: "PIN4" diff --git a/homeassistant/components/lifx/services.yaml b/homeassistant/components/lifx/services.yaml index ebf2032a9a5..0ea0cb7a696 100644 --- a/homeassistant/components/lifx/services.yaml +++ b/homeassistant/components/lifx/services.yaml @@ -17,7 +17,7 @@ set_state: example: 10 power: description: Turn the light on (True) or off (False). Leave out to keep the power as it is. - example: True + example: false effect_pulse: description: Run a flash effect by changing to a color and back. @@ -45,7 +45,7 @@ effect_pulse: example: 2 power_on: description: Powered off lights are temporarily turned on during the effect (default True). - example: False + example: false effect_colorloop: description: Run an effect with looping colors. @@ -67,7 +67,7 @@ effect_colorloop: example: 0 power_on: description: Powered off lights are temporarily turned on during the effect (default True). - example: False + example: false effect_stop: description: Stop a running effect. diff --git a/homeassistant/components/logbook/services.yaml b/homeassistant/components/logbook/services.yaml index 08c463feed2..fb1736d7784 100644 --- a/homeassistant/components/logbook/services.yaml +++ b/homeassistant/components/logbook/services.yaml @@ -12,4 +12,4 @@ log: example: "light.kitchen" domain: description: Icon of domain to display in custom logbook entry [Optional] - example: "light" \ No newline at end of file + example: "light" diff --git a/homeassistant/components/matrix/services.yaml b/homeassistant/components/matrix/services.yaml index 03c441a39ec..f8b0c53bda6 100644 --- a/homeassistant/components/matrix/services.yaml +++ b/homeassistant/components/matrix/services.yaml @@ -3,7 +3,7 @@ send_message: fields: message: description: The message to be sent. - example: 'This is a message I am sending to matrix' + example: This is a message I am sending to matrix target: description: A list of room(s) to send the message to. - example: '#hasstest:matrix.org' \ No newline at end of file + example: "#hasstest:matrix.org" diff --git a/homeassistant/components/media_extractor/services.yaml b/homeassistant/components/media_extractor/services.yaml index c5588c34134..17abffee89d 100644 --- a/homeassistant/components/media_extractor/services.yaml +++ b/homeassistant/components/media_extractor/services.yaml @@ -1,13 +1,12 @@ play_media: description: Downloads file from given url. fields: - entity_id: + entity_id: description: Name(s) of entities to play media on. - example: 'media_player.living_room_chromecast' + example: "media_player.living_room_chromecast" media_content_id: description: The ID of the content to play. Platform dependent. - example: 'https://soundcloud.com/bruttoband/brutto-11' + example: "https://soundcloud.com/bruttoband/brutto-11" media_content_type: description: The type of the content to play. Must be one of MUSIC, TVSHOW, VIDEO, EPISODE, CHANNEL or PLAYLIST MUSIC. - example: 'music' - + example: "music" diff --git a/homeassistant/components/mill/services.yaml b/homeassistant/components/mill/services.yaml index e9e59b50170..5223bf9c890 100644 --- a/homeassistant/components/mill/services.yaml +++ b/homeassistant/components/mill/services.yaml @@ -3,7 +3,7 @@ set_room_temperature: fields: room_name: description: Name of room to change. - example: 'kitchen' + example: "kitchen" away_temp: description: Away temp. example: 12 @@ -12,4 +12,4 @@ set_room_temperature: example: 22 sleep_temp: description: Sleep temp. - example: 17 \ No newline at end of file + example: 17 diff --git a/homeassistant/components/mysensors/services.yaml b/homeassistant/components/mysensors/services.yaml index 74a5ff0f183..a93429550cd 100644 --- a/homeassistant/components/mysensors/services.yaml +++ b/homeassistant/components/mysensors/services.yaml @@ -3,7 +3,7 @@ send_ir_code: fields: entity_id: description: Name(s) of entities that should have the IR code set and be turned on. Platform dependent. - example: 'switch.living_room_1_1' + example: "switch.living_room_1_1" V_IR_SEND: description: IR code to send. - example: '0xC284' \ No newline at end of file + example: "0xC284" diff --git a/homeassistant/components/neato/services.yaml b/homeassistant/components/neato/services.yaml index b40edabd779..2c5b2bd3181 100644 --- a/homeassistant/components/neato/services.yaml +++ b/homeassistant/components/neato/services.yaml @@ -3,7 +3,7 @@ custom_cleaning: fields: entity_id: description: Name of the vacuum entity. [Required] - example: 'vacuum.neato' + example: "vacuum.neato" mode: description: "Set the cleaning mode: 1 for eco and 2 for turbo. Defaults to turbo if not set." example: 2 @@ -15,4 +15,4 @@ custom_cleaning: example: 2 zone: description: Only supported on the Botvac D7. Name of the zone to clean. Defaults to no zone i.e. complete house cleanup. - example: "Kitchen" \ No newline at end of file + example: "Kitchen" diff --git a/homeassistant/components/ness_alarm/services.yaml b/homeassistant/components/ness_alarm/services.yaml index 27f8ba383dd..eb35c48b9f4 100644 --- a/homeassistant/components/ness_alarm/services.yaml +++ b/homeassistant/components/ness_alarm/services.yaml @@ -16,4 +16,4 @@ panic: fields: code: description: The user code to use to trigger the panic. - example: 1234 \ No newline at end of file + example: 1234 diff --git a/homeassistant/components/nexia/services.yaml b/homeassistant/components/nexia/services.yaml index 725b215da5a..23a9498746b 100644 --- a/homeassistant/components/nexia/services.yaml +++ b/homeassistant/components/nexia/services.yaml @@ -5,7 +5,7 @@ set_aircleaner_mode: description: "This setting will affect all zones connected to the thermostat." example: climate.master_bedroom aircleaner_mode: - description: "The air cleaner mode to set. Options include \"auto\", \"quick\", or \"allergy\"." + description: 'The air cleaner mode to set. Options include "auto", "quick", or "allergy".' example: allergy set_humidify_setpoint: @@ -16,4 +16,4 @@ set_humidify_setpoint: example: climate.master_bedroom humidity: description: "The humidification setpoint as an int, range 35-65." - example: 45 \ No newline at end of file + example: 45 diff --git a/homeassistant/components/nuimo_controller/services.yaml b/homeassistant/components/nuimo_controller/services.yaml index ba537544a3b..d98659caa8b 100644 --- a/homeassistant/components/nuimo_controller/services.yaml +++ b/homeassistant/components/nuimo_controller/services.yaml @@ -3,16 +3,15 @@ led_matrix: fields: matrix: description: "A string representation of the matrix to be displayed. See the SDK documentation for more info: https://github.com/getSenic/nuimo-linux-python#write-to-nuimos-led-matrix" - example: - '........ - 0000000. - .000000. - ..00000. - .0.0000. - .00.000. - .000000. - .000000. - ........' + example: "........ + 0000000. + .000000. + ..00000. + .0.0000. + .00.000. + .000000. + .000000. + ........" interval: description: Display interval in seconds - example: 0.5 \ No newline at end of file + example: 0.5 diff --git a/homeassistant/components/ombi/services.yaml b/homeassistant/components/ombi/services.yaml index 5f4f2defe32..6c7f5ced489 100644 --- a/homeassistant/components/ombi/services.yaml +++ b/homeassistant/components/ombi/services.yaml @@ -1,5 +1,4 @@ # Ombi services.yaml entries - submit_movie_request: description: Searches for a movie and requests the first result. fields: @@ -7,7 +6,6 @@ submit_movie_request: description: Search parameter example: "beverly hills cop" - submit_tv_request: description: Searches for a TV show and requests the first result. fields: @@ -18,10 +16,9 @@ submit_tv_request: description: Which season(s) to request (first, latest or all) example: "latest" - submit_music_request: description: Searches for a music album and requests the first result. fields: name: description: Search parameter - example: "nevermind" \ No newline at end of file + example: "nevermind" diff --git a/homeassistant/components/openuv/services.yaml b/homeassistant/components/openuv/services.yaml index be9a7ba522f..ea353e84892 100644 --- a/homeassistant/components/openuv/services.yaml +++ b/homeassistant/components/openuv/services.yaml @@ -1,6 +1,4 @@ # Describes the format for available OpenUV services - ---- update_data: description: Request new data from OpenUV. Consumes two API calls. diff --git a/homeassistant/components/pi_hole/services.yaml b/homeassistant/components/pi_hole/services.yaml index e3cc8624e36..9bb31b1723f 100644 --- a/homeassistant/components/pi_hole/services.yaml +++ b/homeassistant/components/pi_hole/services.yaml @@ -4,7 +4,7 @@ disable: duration: description: Time that the Pi-hole should be disabled for example: "00:00:15" - name: + name: description: "[Optional] When multiple Pi-holes are configured, the name of the one to disable. If omitted, all configured Pi-holes will be disabled." example: "Pi-Hole" enable: @@ -12,4 +12,4 @@ enable: fields: name: description: "[Optional] When multiple Pi-holes are configured, the name of the one to enable. If omitted, all configured Pi-holes will be enabled." - example: "Pi-Hole" \ No newline at end of file + example: "Pi-Hole" diff --git a/homeassistant/components/qvr_pro/services.yaml b/homeassistant/components/qvr_pro/services.yaml index cc6866fee63..0f305d1fa8d 100644 --- a/homeassistant/components/qvr_pro/services.yaml +++ b/homeassistant/components/qvr_pro/services.yaml @@ -3,11 +3,11 @@ start_record: fields: guid: description: GUID of the channel to start recording. - example: '245EBE933C0A597EBE865C0A245E0002' + example: "245EBE933C0A597EBE865C0A245E0002" stop_record: description: Stop QVR Pro recording on specified channel. fields: guid: description: GUID of the channel to stop recording. - example: '245EBE933C0A597EBE865C0A245E0002' \ No newline at end of file + example: "245EBE933C0A597EBE865C0A245E0002" diff --git a/homeassistant/components/rainmachine/services.yaml b/homeassistant/components/rainmachine/services.yaml index 288161968de..e66bd2a1d14 100644 --- a/homeassistant/components/rainmachine/services.yaml +++ b/homeassistant/components/rainmachine/services.yaml @@ -1,6 +1,4 @@ # Describes the format for available RainMachine services - ---- disable_program: description: Disable a program. fields: diff --git a/homeassistant/components/remember_the_milk/services.yaml b/homeassistant/components/remember_the_milk/services.yaml index 74a2c3a4d4f..448b35a3a04 100644 --- a/homeassistant/components/remember_the_milk/services.yaml +++ b/homeassistant/components/remember_the_milk/services.yaml @@ -1,24 +1,21 @@ # Describes the format for available Remember The Milk services create_task: - description: > + description: >- Create (or update) a new task in your Remember The Milk account. If you want to update a task later on, you have to set an "id" when creating the task. Note: Updating a tasks does not support the smart syntax. - fields: name: description: name of the new task, you can use the smart syntax here - example: 'do this ^today #from_hass' - + example: "do this ^today #from_hass" id: description: (optional) identifier for the task you're creating, can be used to update or complete the task later on example: myid complete_task: description: Complete a tasks that was privously created. - fields: id: description: identifier that was defined when creating the task - example: myid \ No newline at end of file + example: myid diff --git a/homeassistant/components/ring/services.yaml b/homeassistant/components/ring/services.yaml index a1500e1360f..bcc9b2f7ff4 100644 --- a/homeassistant/components/ring/services.yaml +++ b/homeassistant/components/ring/services.yaml @@ -1,2 +1,2 @@ update: - description: Updates the data we have for all your ring devices \ No newline at end of file + description: Updates the data we have for all your ring devices diff --git a/homeassistant/components/route53/services.yaml b/homeassistant/components/route53/services.yaml index 20dbfa77f7a..3ca109fcb36 100644 --- a/homeassistant/components/route53/services.yaml +++ b/homeassistant/components/route53/services.yaml @@ -1,2 +1,2 @@ update_records: - description: Trigger update of records. \ No newline at end of file + description: Trigger update of records. diff --git a/homeassistant/components/simplisafe/services.yaml b/homeassistant/components/simplisafe/services.yaml index 6d01dfd8e46..e52af4f2665 100644 --- a/homeassistant/components/simplisafe/services.yaml +++ b/homeassistant/components/simplisafe/services.yaml @@ -1,6 +1,4 @@ # Describes the format for available SimpliSafe services - ---- remove_pin: description: Remove a PIN by its label or value. fields: diff --git a/homeassistant/components/snips/services.yaml b/homeassistant/components/snips/services.yaml index cca39062ce9..f06b94b9eaa 100644 --- a/homeassistant/components/snips/services.yaml +++ b/homeassistant/components/snips/services.yaml @@ -1,31 +1,42 @@ feedback_off: description: Turns feedback sounds off. fields: - site_id: {description: 'Site to turn sounds on, defaults to all sites (optional)', - example: bedroom} + site_id: + description: Site to turn sounds on, defaults to all sites (optional) + example: bedroom feedback_on: description: Turns feedback sounds on. fields: - site_id: {description: 'Site to turn sounds on, defaults to all sites (optional)', - example: bedroom} + site_id: + description: Site to turn sounds on, defaults to all sites (optional) + example: bedroom say: description: Send a TTS message to Snips. fields: - custom_data: {description: custom data that will be included with all messages - in this session, example: user=UserName} - site_id: {description: 'Site to use to start session, defaults to default (optional)', - example: bedroom} - text: {description: Text to say., example: My name is snips} + custom_data: + description: custom data that will be included with all messages in this session + example: user=UserName + site_id: + description: Site to use to start session, defaults to default (optional) + example: bedroom + text: + description: Text to say. + example: My name is snips say_action: description: Send a TTS message to Snips to listen for a response. fields: - can_be_enqueued: {description: 'If True, session waits for an open session to - end, if False session is dropped if one is running', example: true} - custom_data: {description: custom data that will be included with all messages - in this session, example: user=UserName} - intent_filter: {description: Optional Array of Strings - A list of intents names - to restrict the NLU resolution to on the first query., example: 'turnOnLights, - turnOffLights'} - site_id: {description: 'Site to use to start session, defaults to default (optional)', - example: bedroom} - text: {description: Text to say, example: My name is snips} + can_be_enqueued: + description: If True, session waits for an open session to end, if False session is dropped if one is running + example: true + custom_data: + description: custom data that will be included with all messages in this session + example: user=UserName + intent_filter: + description: Optional Array of Strings - A list of intents names to restrict the NLU resolution to on the first query. + example: "turnOnLights, turnOffLights" + site_id: + description: Site to use to start session, defaults to default (optional) + example: bedroom + text: + description: Text to say + example: My name is snips diff --git a/homeassistant/components/speedtestdotnet/services.yaml b/homeassistant/components/speedtestdotnet/services.yaml index db813affe76..299d457350d 100644 --- a/homeassistant/components/speedtestdotnet/services.yaml +++ b/homeassistant/components/speedtestdotnet/services.yaml @@ -1,2 +1,2 @@ speedtest: - description: Immediately take a speedest with Speedtest.net \ No newline at end of file + description: Immediately take a speedest with Speedtest.net diff --git a/homeassistant/components/stream/services.yaml b/homeassistant/components/stream/services.yaml index c3b25e06348..a8652335bf1 100644 --- a/homeassistant/components/stream/services.yaml +++ b/homeassistant/components/stream/services.yaml @@ -5,11 +5,11 @@ record: description: The input source for the stream. example: "rtsp://my.stream.feed:554" filename: - description: The file name string. + description: The file name string. example: "/tmp/my_stream.mp4" duration: description: "Target recording length (in seconds). Default: 30" example: 30 lookback: description: "Target lookback period (in seconds) to include in addition to duration. Only available if there is currently an active HLS stream for stream_source. Default: 0" - example: 5 \ No newline at end of file + example: 5 diff --git a/homeassistant/components/streamlabswater/services.yaml b/homeassistant/components/streamlabswater/services.yaml index fa2a04c9586..63ab2be9759 100644 --- a/homeassistant/components/streamlabswater/services.yaml +++ b/homeassistant/components/streamlabswater/services.yaml @@ -1,4 +1,6 @@ set_away_mode: - description: 'Set the home/away mode for a Streamlabs Water Monitor.' + description: "Set the home/away mode for a Streamlabs Water Monitor." fields: - away_mode: {description: home or away, example: 'home'} \ No newline at end of file + away_mode: + description: home or away + example: "home" diff --git a/homeassistant/components/timer/services.yaml b/homeassistant/components/timer/services.yaml index b299aaa8185..cd810c21de5 100644 --- a/homeassistant/components/timer/services.yaml +++ b/homeassistant/components/timer/services.yaml @@ -6,10 +6,10 @@ start: fields: entity_id: description: Entity id of the timer to start. [optional] - example: 'timer.timer0' + example: "timer.timer0" duration: description: Duration the timer requires to finish. [optional] - example: '00:01:00 or 60' + example: "00:01:00 or 60" pause: description: Pause a timer. @@ -17,7 +17,7 @@ pause: fields: entity_id: description: Entity id of the timer to pause. [optional] - example: 'timer.timer0' + example: "timer.timer0" cancel: description: Cancel a timer. @@ -25,7 +25,7 @@ cancel: fields: entity_id: description: Entity id of the timer to cancel. [optional] - example: 'timer.timer0' + example: "timer.timer0" finish: description: Finish a timer. @@ -33,4 +33,4 @@ finish: fields: entity_id: description: Entity id of the timer to finish. [optional] - example: 'timer.timer0' \ No newline at end of file + example: "timer.timer0" diff --git a/homeassistant/components/utility_meter/services.yaml b/homeassistant/components/utility_meter/services.yaml index 42522f81876..d33229f4e56 100644 --- a/homeassistant/components/utility_meter/services.yaml +++ b/homeassistant/components/utility_meter/services.yaml @@ -5,31 +5,31 @@ reset: fields: entity_id: description: Name(s) of the utility meter to reset - example: 'utility_meter.energy' + example: "utility_meter.energy" next_tariff: description: Changes the tariff to the next one. fields: entity_id: description: Name(s) of entities to reset - example: 'utility_meter.energy' + example: "utility_meter.energy" select_tariff: description: selects the current tariff of an utility meter. fields: entity_id: description: Name of the entity to set the tariff for - example: 'utility_meter.energy' + example: "utility_meter.energy" tariff: description: Name of the tariff to switch to - example: 'offpeak' + example: "offpeak" calibrate: description: calibrates an utility meter. fields: entity_id: description: Name of the entity to calibrate - example: 'utility_meter.energy' + example: "utility_meter.energy" value: description: Value to which set the meter - example: '100' \ No newline at end of file + example: "100" diff --git a/homeassistant/components/vallox/services.yaml b/homeassistant/components/vallox/services.yaml index ea92e0ca2d9..65757b70364 100644 --- a/homeassistant/components/vallox/services.yaml +++ b/homeassistant/components/vallox/services.yaml @@ -2,8 +2,7 @@ set_profile: description: Set the ventilation profile. fields: profile: - description: > - Set to any of: Home, Away, Boost, Fireplace + description: "Set to any of: Home, Away, Boost, Fireplace" example: Away set_profile_fan_speed_home: @@ -13,7 +12,6 @@ set_profile_fan_speed_home: description: Fan speed in %. Integer, between 0 and 100. example: 50 - set_profile_fan_speed_away: description: Set the fan speed of the Away profile. fields: diff --git a/homeassistant/components/velbus/services.yaml b/homeassistant/components/velbus/services.yaml index ea31b951a18..490c746fa74 100644 --- a/homeassistant/components/velbus/services.yaml +++ b/homeassistant/components/velbus/services.yaml @@ -10,9 +10,9 @@ set_memo_text: description: > The module address in decimal format. The decimal addresses are displayed in front of the modules listed at the integration page. - example: '11' + example: "11" memo_text: description: > The actual text to be displayed. Text is limited to 64 characters. - example: 'Do not forget trash' \ No newline at end of file + example: "Do not forget trash" diff --git a/homeassistant/components/vesync/services.yaml b/homeassistant/components/vesync/services.yaml index 2174c974e16..dec19740aef 100644 --- a/homeassistant/components/vesync/services.yaml +++ b/homeassistant/components/vesync/services.yaml @@ -1,2 +1,2 @@ update_devices: - description: Add new VeSync devices to Home Assistant \ No newline at end of file + description: Add new VeSync devices to Home Assistant diff --git a/homeassistant/components/webostv/services.yaml b/homeassistant/components/webostv/services.yaml index 1dfb3a6f1d3..70aa94b6ea6 100644 --- a/homeassistant/components/webostv/services.yaml +++ b/homeassistant/components/webostv/services.yaml @@ -1,35 +1,37 @@ -# Describes the format for available webostv services +# Describes the format for available webostv services button: - description: 'Send a button press command.' + description: "Send a button press command." fields: entity_id: description: Name(s) of the webostv entities where to run the API method. - example: 'media_player.living_room_tv' + example: "media_player.living_room_tv" button: - description: Name of the button to press. Known possible values are + description: >- + Name of the button to press. Known possible values are LEFT, RIGHT, DOWN, UP, HOME, BACK, ENTER, DASH, INFO, ASTERISK, CC, EXIT, MUTE, RED, GREEN, BLUE, VOLUMEUP, VOLUMEDOWN, CHANNELUP, CHANNELDOWN, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 - example: 'LEFT' + example: "LEFT" command: - description: 'Send a command.' + description: "Send a command." fields: entity_id: description: Name(s) of the webostv entities where to run the API method. - example: 'media_player.living_room_tv' + example: "media_player.living_room_tv" command: - description: Endpoint of the command. Known valid endpoints are listed in + description: >- + Endpoint of the command. Known valid endpoints are listed in https://github.com/TheRealLink/pylgtv/blob/master/pylgtv/endpoints.py - example: 'media.controls/rewind' + example: "media.controls/rewind" select_sound_output: - description: 'Send the TV the command to change sound output.' + description: "Send the TV the command to change sound output." fields: entity_id: description: Name(s) of the webostv entities to change sound output on. - example: 'media_player.living_room_tv' + example: "media_player.living_room_tv" sound_output: description: Name of the sound output to switch to. - example: 'external_speaker' + example: "external_speaker" diff --git a/homeassistant/components/wink/services.yaml b/homeassistant/components/wink/services.yaml index 500f1fd3f2a..ac050fd0087 100644 --- a/homeassistant/components/wink/services.yaml +++ b/homeassistant/components/wink/services.yaml @@ -1,17 +1,16 @@ # Describes the format for available Wink services - pair_new_device: description: Pair a new device to a Wink Hub. fields: hub_name: description: The name of the hub to pair a new device to. - example: 'My hub' + example: "My hub" pairing_mode: description: One of ["zigbee", "zwave", "zwave_exclusion", "zwave_network_rediscovery", "lutron", "bluetooth", "kidde"]. - example: 'zigbee' + example: "zigbee" kidde_radio_code: - description: 'A string of 8 1s and 0s one for each dip switch on the kidde device left --> right = 1 --> 8. Down = 1 and Up = 0' - example: '10101010' + description: "A string of 8 1s and 0s one for each dip switch on the kidde device left --> right = 1 --> 8. Down = 1 and Up = 0" + example: "10101010" rename_wink_device: description: Rename the provided device. @@ -40,47 +39,55 @@ set_siren_volume: fields: entity_id: description: Name(s) of the entities to set. - example: 'switch.dome_siren' + example: "switch.dome_siren" volume: - description: Volume level. One of ["low", "medium", "high"]. - example: "high" + description: Volume level. One of ["low", "medium", "high"]. + example: "high" enable_chime: description: Enable the chime of a Dome siren with the provided sound. fields: entity_id: description: Name(s) of the entities to set. - example: 'switch.dome_siren' + example: "switch.dome_siren" tone: - description: The tone to use for the chime. One of ["doorbell", "fur_elise", "doorbell_extended", "alert", "william_tell", "rondo_alla_turca", "police_siren", "evacuation", "beep_beep", "beep", "inactive"] - example: "doorbell" + description: >- + The tone to use for the chime. One of ["doorbell", "fur_elise", + "doorbell_extended", "alert", "william_tell", "rondo_alla_turca", + "police_siren", "evacuation", "beep_beep", "beep", "inactive"] + example: "doorbell" set_siren_tone: description: Set the sound to use when the siren is enabled. (This doesn't enable the siren) fields: entity_id: description: Name(s) of the entities to set. - example: 'switch.dome_siren' + example: "switch.dome_siren" tone: - description: The tone to use for the chime. One of ["doorbell", "fur_elise", "doorbell_extended", "alert", "william_tell", "rondo_alla_turca", "police_siren", "evacuation", "beep_beep", "beep", "inactive"] - example: "alert" + description: >- + The tone to use for the chime. One of ["doorbell", "fur_elise", + "doorbell_extended", "alert", "william_tell", "rondo_alla_turca", + "police_siren", "evacuation", "beep_beep", "beep", "inactive"] + example: "alert" siren_set_auto_shutoff: description: How long to sound the siren before turning off. fields: entity_id: description: Name(s) of the entities to set. - example: 'switch.dome_siren' + example: "switch.dome_siren" auto_shutoff: - description: The time in seconds to sound the siren. One of [None, -1, 30, 60, 120] (None and -1 are forever. Use None for gocontrol, and -1 for Dome) - example: 60 + description: >- + The time in seconds to sound the siren. One of [None, -1, 30, 60, 120] + (None and -1 are forever. Use None for gocontrol, and -1 for Dome) + example: 60 set_siren_strobe_enabled: description: Enable or disable the strobe light when the siren is sounding. fields: entity_id: description: Name(s) of the entities to set. - example: 'switch.dome_siren' + example: "switch.dome_siren" enabled: description: "True or False" @@ -89,38 +96,38 @@ set_chime_strobe_enabled: fields: entity_id: description: Name(s) of the entities to set. - example: 'switch.dome_siren' + example: "switch.dome_siren" enabled: - description: "True or False" + description: "True or False" enable_siren: description: Enable/disable the siren. fields: entity_id: description: Name(s) of the entities to set - example: 'switch.dome_siren' + example: "switch.dome_siren" enabled: - description: "True or False" + description: "true or false" set_chime_volume: description: Set the volume of the chime for a Dome siren/chime. fields: entity_id: description: Name(s) of the entities to set. - example: 'switch.dome_siren' + example: "switch.dome_siren" volume: - description: Volume level. One of ["low", "medium", "high"] - example: "low" + description: Volume level. One of ["low", "medium", "high"] + example: "low" set_nimbus_dial_configuration: description: Set the configuration of an individual nimbus dial fields: entity_id: description: Name of the entity to set. - example: 'wink.nimbus_dial_3' + example: "wink.nimbus_dial_3" rotation: description: Direction dial hand should spin ["cw" or "ccw"] - example: 'cw' + example: "cw" ticks: description: Number of times the hand should move example: 12 @@ -145,12 +152,15 @@ set_nimbus_dial_state: fields: entity_id: description: Name of the entity to set. - example: 'wink.nimbus_dial_3' + example: "wink.nimbus_dial_3" value: description: The value that should be set (Should be between min_value and max_value) example: 250 labels: - description: The values shown on the dial labels ["Dial 1", "test"] the first value is what is shown by default the second value is shown when the nimbus is pressed + description: >- + The values shown on the dial labels ["Dial 1", "test"] the first value + is what is shown by default the second value is shown when the nimbus is + pressed. example: ["example", "test"] set_lock_vacation_mode: @@ -158,7 +168,7 @@ set_lock_vacation_mode: fields: entity_id: description: Name of lock to unlock. - example: 'lock.front_door' + example: "lock.front_door" enabled: description: enable or disable. true or false. example: true @@ -168,7 +178,7 @@ set_lock_alarm_mode: fields: entity_id: description: Name of lock to unlock. - example: 'lock.front_door' + example: "lock.front_door" mode: description: One of tamper, activity, or forced_entry. example: tamper @@ -178,7 +188,7 @@ set_lock_alarm_sensitivity: fields: entity_id: description: Name of lock to unlock. - example: 'lock.front_door' + example: "lock.front_door" sensitivity: description: One of low, medium_low, medium, medium_high, high. example: medium @@ -188,7 +198,7 @@ set_lock_alarm_state: fields: entity_id: description: Name of lock to unlock. - example: 'lock.front_door' + example: "lock.front_door" enabled: description: enable or disable. true or false. example: true @@ -198,7 +208,7 @@ set_lock_beeper_state: fields: entity_id: description: Name of lock to unlock. - example: 'lock.front_door' + example: "lock.front_door" enabled: description: enable or disable. true or false. example: true @@ -208,10 +218,10 @@ add_new_lock_key_code: fields: entity_id: description: Name of lock to unlock. - example: 'lock.front_door' + example: "lock.front_door" name: description: name of the new key code. example: Bob code: description: new key code, length must match length of other codes. Default length is 4. - example: 1234 \ No newline at end of file + example: 1234 diff --git a/homeassistant/components/xiaomi_miio/services.yaml b/homeassistant/components/xiaomi_miio/services.yaml index 4306ce4e719..a5308b08d6d 100644 --- a/homeassistant/components/xiaomi_miio/services.yaml +++ b/homeassistant/components/xiaomi_miio/services.yaml @@ -3,49 +3,49 @@ fan_set_buzzer_on: fields: entity_id: description: Name of the xiaomi miio entity. - example: 'fan.xiaomi_miio_device' + example: "fan.xiaomi_miio_device" fan_set_buzzer_off: description: Turn the buzzer off. fields: entity_id: description: Name of the xiaomi miio entity. - example: 'fan.xiaomi_miio_device' + example: "fan.xiaomi_miio_device" fan_set_led_on: description: Turn the led on. fields: entity_id: description: Name of the xiaomi miio entity. - example: 'fan.xiaomi_miio_device' + example: "fan.xiaomi_miio_device" fan_set_led_off: description: Turn the led off. fields: entity_id: description: Name of the xiaomi miio entity. - example: 'fan.xiaomi_miio_device' + example: "fan.xiaomi_miio_device" fan_set_child_lock_on: description: Turn the child lock on. fields: entity_id: description: Name of the xiaomi miio entity. - example: 'fan.xiaomi_miio_device' + example: "fan.xiaomi_miio_device" fan_set_child_lock_off: description: Turn the child lock off. fields: entity_id: description: Name of the xiaomi miio entity. - example: 'fan.xiaomi_miio_device' + example: "fan.xiaomi_miio_device" fan_set_favorite_level: description: Set the favorite level. fields: entity_id: description: Name of the xiaomi miio entity. - example: 'fan.xiaomi_miio_device' + example: "fan.xiaomi_miio_device" level: description: Level, between 0 and 16. example: 1 @@ -55,7 +55,7 @@ fan_set_fan_level: fields: entity_id: description: Name of the xiaomi miio entity. - example: 'fan.xiaomi_miio_device' + example: "fan.xiaomi_miio_device" level: description: Level, between 1 and 3. example: 1 @@ -65,7 +65,7 @@ fan_set_led_brightness: fields: entity_id: description: Name of the xiaomi miio entity. - example: 'fan.xiaomi_miio_device' + example: "fan.xiaomi_miio_device" brightness: description: Brightness (0 = Bright, 1 = Dim, 2 = Off) example: 1 @@ -75,35 +75,35 @@ fan_set_auto_detect_on: fields: entity_id: description: Name of the xiaomi miio entity. - example: 'fan.xiaomi_miio_device' + example: "fan.xiaomi_miio_device" fan_set_auto_detect_off: description: Turn the auto detect off. fields: entity_id: description: Name of the xiaomi miio entity. - example: 'fan.xiaomi_miio_device' + example: "fan.xiaomi_miio_device" fan_set_learn_mode_on: description: Turn the learn mode on. fields: entity_id: description: Name of the xiaomi miio entity. - example: 'fan.xiaomi_miio_device' + example: "fan.xiaomi_miio_device" fan_set_learn_mode_off: description: Turn the learn mode off. fields: entity_id: description: Name of the xiaomi miio entity. - example: 'fan.xiaomi_miio_device' + example: "fan.xiaomi_miio_device" fan_set_volume: description: Set the sound volume. fields: entity_id: description: Name of the xiaomi miio entity. - example: 'fan.xiaomi_miio_device' + example: "fan.xiaomi_miio_device" volume: description: Volume, between 0 and 100. example: 50 @@ -113,14 +113,14 @@ fan_reset_filter: fields: entity_id: description: Name of the xiaomi miio entity. - example: 'fan.xiaomi_miio_device' + example: "fan.xiaomi_miio_device" 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. - example: 'fan.xiaomi_miio_device' + example: "fan.xiaomi_miio_device" features: description: Integer, known values are 0 (default) and 1 (turbo mode). example: 1 @@ -130,7 +130,7 @@ fan_set_target_humidity: fields: entity_id: description: Name of the xiaomi miio entity. - example: 'fan.xiaomi_miio_device' + example: "fan.xiaomi_miio_device" humidity: description: Target humidity. Allowed values are 30, 40, 50, 60, 70 and 80. example: 50 @@ -140,14 +140,14 @@ fan_set_dry_on: fields: entity_id: description: Name of the xiaomi miio entity. - example: 'fan.xiaomi_miio_device' + example: "fan.xiaomi_miio_device" fan_set_dry_off: description: Turn the dry mode off. fields: entity_id: description: Name of the xiaomi miio entity. - example: 'fan.xiaomi_miio_device' + example: "fan.xiaomi_miio_device" light_set_scene: description: Set a fixed scene. @@ -173,77 +173,77 @@ 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.' - example: 'light.xiaomi_miio' + description: "Name of the entity to act on." + example: "light.xiaomi_miio" 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.' - example: 'light.xiaomi_miio' + description: "Name of the entity to act on." + example: "light.xiaomi_miio" light_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.' - example: 'light.xiaomi_miio' + description: "Name of the entity to act on." + example: "light.xiaomi_miio" light_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.' - example: 'light.xiaomi_miio' + description: "Name of the entity to act on." + example: "light.xiaomi_miio" 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.' - example: 'light.xiaomi_miio' + description: "Name of the entity to act on." + example: "light.xiaomi_miio" 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.' - example: 'light.xiaomi_miio' + description: "Name of the entity to act on." + example: "light.xiaomi_miio" 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.' fields: entity_id: - description: 'Name of the entity to learn command from.' - example: 'remote.xiaomi_miio' + description: "Name of the entity to learn command from." + example: "remote.xiaomi_miio" slot: - description: 'Define the slot used to save the IR command (Value from 1 to 1000000)' - example: '1' + description: "Define the slot used to save the IR command (Value from 1 to 1000000)" + example: "1" timeout: - description: 'Define the timeout in seconds, before which the command must be learned.' - example: '30' + description: "Define the timeout in seconds, before which the command must be learned." + example: "30" switch_set_wifi_led_on: description: Turn the wifi led on. fields: entity_id: description: Name of the xiaomi miio entity. - example: 'switch.xiaomi_miio_device' + example: "switch.xiaomi_miio_device" switch_set_wifi_led_off: description: Turn the wifi led off. fields: entity_id: description: Name of the xiaomi miio entity. - example: 'switch.xiaomi_miio_device' + example: "switch.xiaomi_miio_device" switch_set_power_price: description: Set the power price. fields: entity_id: description: Name of the xiaomi miio entity. - example: 'switch.xiaomi_miio_device' + example: "switch.xiaomi_miio_device" mode: description: Power price, between 0 and 999. example: 31 @@ -253,66 +253,66 @@ switch_set_power_mode: fields: entity_id: description: Name of the xiaomi miio entity. - example: 'switch.xiaomi_miio_device' + example: "switch.xiaomi_miio_device" mode: description: Power mode, valid values are 'normal' and 'green'. - example: 'green' + example: "green" 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`. fields: entity_id: description: Name of the vacuum entity. - example: 'vacuum.xiaomi_vacuum_cleaner' + example: "vacuum.xiaomi_vacuum_cleaner" vacuum_remote_control_stop: description: Stop remote control mode of the vacuum cleaner. fields: entity_id: description: Name of the vacuum entity. - example: 'vacuum.xiaomi_vacuum_cleaner' + example: "vacuum.xiaomi_vacuum_cleaner" vacuum_remote_control_move: description: Remote control the vacuum cleaner, make sure you first set it in remote control mode with `remote_control_start`. fields: entity_id: description: Name of the vacuum entity. - example: 'vacuum.xiaomi_vacuum_cleaner' + example: "vacuum.xiaomi_vacuum_cleaner" velocity: description: Speed, between -0.29 and 0.29. - example: '0.2' + example: "0.2" rotation: description: Rotation, between -179 degrees and 179 degrees. - example: '90' + example: "90" duration: description: Duration of the movement. - example: '1500' + example: "1500" vacuum_remote_control_move_step: description: Remote control the vacuum cleaner, only makes one move and then stops. fields: entity_id: description: Name of the vacuum entity. - example: 'vacuum.xiaomi_vacuum_cleaner' + example: "vacuum.xiaomi_vacuum_cleaner" velocity: description: Speed, between -0.29 and 0.29. - example: '0.2' + example: "0.2" rotation: description: Rotation, between -179 degrees and 179 degrees. - example: '90' + example: "90" duration: description: Duration of the movement. - example: '1500' + example: "1500" vacuum_clean_zone: description: Start the cleaning operation in the selected areas for the number of repeats indicated. fields: entity_id: description: Name of the vacuum entity. - example: 'vacuum.xiaomi_vacuum_cleaner' + example: "vacuum.xiaomi_vacuum_cleaner" zone: description: Array of zones. Each zone is an array of 4 integer values. - example: '[[23510,25311,25110,26362]]' + example: "[[23510,25311,25110,26362]]" repeats: description: Number of cleaning repeats for each zone between 1 and 3. - example: '1' + example: "1" diff --git a/homeassistant/components/yamaha/services.yaml b/homeassistant/components/yamaha/services.yaml index c92522008be..f96d3ea58ef 100644 --- a/homeassistant/components/yamaha/services.yaml +++ b/homeassistant/components/yamaha/services.yaml @@ -3,10 +3,10 @@ enable_output: fields: entity_id: description: Name(s) of entities to enable/disable port on. - example: 'media_player.yamaha' + example: "media_player.yamaha" port: description: Name of port to enable/disable. - example: 'hdmi1' + example: "hdmi1" enabled: description: Boolean indicating if port should be enabled or not. - example: true \ No newline at end of file + example: true diff --git a/homeassistant/components/zoneminder/services.yaml b/homeassistant/components/zoneminder/services.yaml index e6346d2f384..a6fb85b641d 100644 --- a/homeassistant/components/zoneminder/services.yaml +++ b/homeassistant/components/zoneminder/services.yaml @@ -3,4 +3,4 @@ set_run_state: fields: name: description: The string name of the ZoneMinder run state to set as active. - example: 'Home' \ No newline at end of file + example: "Home" diff --git a/homeassistant/components/zwave/services.yaml b/homeassistant/components/zwave/services.yaml index d908941fb92..b4a5db58986 100644 --- a/homeassistant/components/zwave/services.yaml +++ b/homeassistant/components/zwave/services.yaml @@ -31,14 +31,14 @@ heal_network: fields: return_routes: description: Whether or not to update the return routes from the nodes to the controller. Defaults to False. - example: True + example: true heal_node: description: Start a Z-Wave node heal. Refer to OZW_Log.txt for progress. fields: return_routes: description: Whether or not to update the return routes from the node to the controller. Defaults to False. - example: True + example: true remove_node: description: Remove a node from the Z-Wave network. Refer to OZW_Log.txt for progress. @@ -100,7 +100,6 @@ set_poll_intensity: description: The intensity to poll, 0 = disabled, 1 = Every time through list, 2 = Every second time through list... example: 2 - print_config_parameter: description: Prints a Z-Wave node config parameter value to log. fields: @@ -120,7 +119,7 @@ refresh_entity: fields: entity_id: description: Name of the entity to refresh. - example: 'light.leviton_vrmx11lz_multilevel_scene_switch_level_40' + example: "light.leviton_vrmx11lz_multilevel_scene_switch_level_40" refresh_node: description: Refresh zwave node. @@ -153,7 +152,7 @@ test_node: description: This will send test messages to a node in the Z-Wave network. This could bring back dead nodes. fields: node_id: - description: ID of the node to send test messages to. + description: ID of the node to send test messages to. example: 10 messages: description: Optional. Amount of test messages to send. @@ -167,10 +166,10 @@ rename_node: example: 10 update_ids: description: (optional) Rename the entity IDs for entities of this node. - example: True + example: true name: description: New Name - example: 'kitchen' + example: "kitchen" rename_value: description: Set the name of a node value. This will affect the ID of the value entity. Value IDs can be queried from /api/zwave/values/{node_id} @@ -183,10 +182,10 @@ rename_value: example: 72037594255792737 update_ids: description: (optional) Update the entity ID for this value's entity. - example: True + example: true name: description: New Name - example: 'Luminosity' + example: "Luminosity" reset_node_meters: description: Resets the meter counters of a node. diff --git a/requirements_test_pre_commit.txt b/requirements_test_pre_commit.txt index b0deb01b3da..9061a4598df 100644 --- a/requirements_test_pre_commit.txt +++ b/requirements_test_pre_commit.txt @@ -2,8 +2,9 @@ bandit==1.6.2 black==19.10b0 -codespell==v1.16.0 +codespell==1.16.0 flake8-docstrings==1.5.0 flake8==3.7.9 -isort==v4.3.21 +isort==4.3.21 pydocstyle==5.0.2 +yamllint==1.21.0 diff --git a/script/gen_requirements_all.py b/script/gen_requirements_all.py index 289cb619171..ce22b66eb35 100755 --- a/script/gen_requirements_all.py +++ b/script/gen_requirements_all.py @@ -262,7 +262,7 @@ def requirements_pre_commit_output(): for repo in (x for x in pre_commit_conf["repos"] if x.get("rev")): for hook in repo["hooks"]: if hook["id"] not in IGNORE_PRE_COMMIT_HOOK_ID: - reqs.append(f"{hook['id']}=={repo['rev']}") + reqs.append(f"{hook['id']}=={repo['rev'].lstrip('v')}") reqs.extend(x for x in hook.get("additional_dependencies", ())) output = [ f"# Automatically generated "