From a1189eae7f119ce8fcad95f8b876c99858dd775d Mon Sep 17 00:00:00 2001 From: Ben Date: Tue, 7 Jan 2020 15:50:43 +0100 Subject: [PATCH] add surepetcare doc (#9590) * add surepetcare doc * fix date * Update surepetcare.markdown * add some missing info * :pencil2: Tweaks * Move documentation to new integrations location Co-authored-by: Franck Nijhof --- source/_integrations/surepetcare.markdown | 86 +++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 source/_integrations/surepetcare.markdown diff --git a/source/_integrations/surepetcare.markdown b/source/_integrations/surepetcare.markdown new file mode 100644 index 00000000000..23e36fc43c8 --- /dev/null +++ b/source/_integrations/surepetcare.markdown @@ -0,0 +1,86 @@ +--- +title: "Sure Petcare" +description: "Instructions on how to integrate the Sure Petcare cat and pet flaps into Home Assistant." +date: 2019-06-08 20:00 +ha_category: + - Binary Sensor + - Sensor +ha_release: '0.104.0' +ha_iot_class: Cloud Polling +--- + +The `surepetcare` component allows you to get information on your Sure Petcare Connect Pet or Cat Flap. + +## Configuration + +To add a flap and pet, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +surepetcare: + username: x@y.com + password: v3rys3cr3t! + household_id: 1337 + flaps: [{id: 2337, name: Flap}] + pets: [{id: 3337, name: Pet}] +``` + +{% configuration %} + username: + description: The Sure Petcare Username/Email + required: true + type: string + password: + description: The Sure Petcare Password + required: true + type: string + household_id: + description: The Sure Petcare household_id + required: true + type: integer + flaps: + description: The Sure Petcare flaps + required: true + type: map + keys: + id: + description: The Sure Petcare id of a flap + required: true + type: integer + name: + description: A name for the flap + required: true + type: string + pets: + description: Pets managed by Sure Petcare flap(s) + required: true + type: map + keys: + id: + description: The Sure Petcare id of a pet + required: true + type: integer + name: + description: The name of the pet + required: true + type: string + icon: + description: "Icon to display (e.g., `mdi:cat`)" + required: false + default: "mdi:cat" + type: string + scan_interval: + description: "Minimum time interval between updates. Supported formats: `scan_interval: 'HH:MM:SS'`, `scan_interval: 'HH:MM'` and Time period dictionary (see example below)." + required: false + default: 3 minutes + type: time + device_class: + description: The type/class of the sensor to set the icon in the frontend. + required: false + default: lock + type: device_class +{% endconfiguration %} + +## Getting the IDs of your household, flaps and pets + +For now, please use the [sp_cli.py](https://github.com/rcastberg/sure_petcare/blob/master/sp_cli.py) from [@rcastberg](https://github.com/rcastberg) to fetch the IDs from the Sure Petcare API. With default setting, the IDs will be written as JSON to `~/.surepet.cache`.