Skip to content

Commit

Permalink
Add support for Eversweet 5 Mini
Browse files Browse the repository at this point in the history
Add support for Eversweet 5 Mini
  • Loading branch information
RobertD502 authored Jun 10, 2023
2 parents 892666d + 4da3ece commit f134e2e
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 14 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Custom Home Assistant component for controlling and monitoring PetKit devices an
- [Fresh Element Solo](https://www.amazon.com/PETKIT-Automatic-Dispenser-Compatible-Freeze-Dried/dp/B09158J9PF/)
- [Fresh Element Mini Pro](https://www.amazon.com/PETKIT-Automatic-Stainless-Indicator-Dispenser-2-8L/dp/B08GS1CPHH/)
- [Eversweet 3 Pro Water Fountain](https://www.amazon.com/PETKIT-Wireless-Fountain-Stainless-Dispenser/dp/B09QRH6L3M/)
- [Eversweet 5 Mini Water Fountain](https://www.petkit.nl/products/eversweet-5-mini-binnen-2-weken-geleverd)
- [Pura X Litter Box](https://www.amazon.com/PETKIT-Self-Cleaning-Scooping-Automatic-Multiple/dp/B08T9CCP1M)
- [Pura MAX Litter Box with/without Pura Air deodorizer](https://www.amazon.com/PETKIT-Self-Cleaning-Capacity-Multiple-Automatic/dp/B09KC7Q4YF)

Expand Down Expand Up @@ -188,7 +189,7 @@ Each Feeder has the following entities:
___

<details>
<summary> <b>Eversweet 3 Pro</b> (<i>click to expand</i>)</summary>
<summary> <b>Eversweet 3 Pro/5 Mini</b> (<i>click to expand</i>)</summary>
<!---->
<br/>
Each water fountain has the following entities:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/petkit/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def device_info(self) -> dict[str, Any]:
"identifiers": {(DOMAIN, self.wf_data.id)},
"name": self.wf_data.data['name'],
"manufacturer": "PetKit",
"model": WATER_FOUNTAINS[self.wf_data.type],
"model": WATER_FOUNTAINS.get(self.wf_data.data["typeCode"], "Unidentified Water Fountain") if "typeCode" in self.wf_data.data else "Unidentified Water Fountain",
"sw_version": f'{self.wf_data.data["hardware"]}.{self.wf_data.data["firmware"]}'
}

Expand Down
2 changes: 1 addition & 1 deletion custom_components/petkit/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def device_info(self) -> dict[str, Any]:
"identifiers": {(DOMAIN, self.wf_data.id)},
"name": self.wf_data.data['name'],
"manufacturer": "PetKit",
"model": WATER_FOUNTAINS[self.wf_data.type],
"model": WATER_FOUNTAINS.get(self.wf_data.data["typeCode"], "Unidentified Water Fountain") if "typeCode" in self.wf_data.data else "Unidentified Water Fountain",
"sw_version": f'{self.wf_data.data["hardware"]}.{self.wf_data.data["firmware"]}'
}

Expand Down
4 changes: 3 additions & 1 deletion custom_components/petkit/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@
}

WATER_FOUNTAINS = {
'w5': 'Eversweet 3 Pro',
2: 'Eversweet 5 Mini',
4: 'Eversweet 3 Pro',
}


FEEDERS = {
'd3': 'Fresh Element Infinity',
'd4': 'Fresh Element Solo',
Expand Down
2 changes: 1 addition & 1 deletion custom_components/petkit/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/RobertD502/home-assistant-petkit/issues",
"requirements": ["petkitaio==0.1.2", "tzlocal>=4.2"],
"version": "0.1.1"
"version": "0.1.2"
}
4 changes: 2 additions & 2 deletions custom_components/petkit/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def device_info(self) -> dict[str, Any]:
"identifiers": {(DOMAIN, self.wf_data.id)},
"name": self.wf_data.data['name'],
"manufacturer": "PetKit",
"model": WATER_FOUNTAINS[self.wf_data.type],
"model": WATER_FOUNTAINS.get(self.wf_data.data["typeCode"], "Unidentified Water Fountain") if "typeCode" in self.wf_data.data else "Unidentified Water Fountain",
"sw_version": f'{self.wf_data.data["hardware"]}.{self.wf_data.data["firmware"]}'
}

Expand Down Expand Up @@ -205,7 +205,7 @@ def device_info(self) -> dict[str, Any]:
"identifiers": {(DOMAIN, self.wf_data.id)},
"name": self.wf_data.data['name'],
"manufacturer": "PetKit",
"model": WATER_FOUNTAINS[self.wf_data.type],
"model": WATER_FOUNTAINS.get(self.wf_data.data["typeCode"], "Unidentified Water Fountain") if "typeCode" in self.wf_data.data else "Unidentified Water Fountain",
"sw_version": f'{self.wf_data.data["hardware"]}.{self.wf_data.data["firmware"]}'
}

Expand Down
8 changes: 4 additions & 4 deletions custom_components/petkit/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def device_info(self) -> dict[str, Any]:
"identifiers": {(DOMAIN, self.wf_data.id)},
"name": self.wf_data.data['name'],
"manufacturer": "PetKit",
"model": WATER_FOUNTAINS[self.wf_data.type],
"model": WATER_FOUNTAINS.get(self.wf_data.data["typeCode"], "Unidentified Water Fountain") if "typeCode" in self.wf_data.data else "Unidentified Water Fountain",
"sw_version": f'{self.wf_data.data["hardware"]}.{self.wf_data.data["firmware"]}'
}

Expand Down Expand Up @@ -235,7 +235,7 @@ def device_info(self) -> dict[str, Any]:
"identifiers": {(DOMAIN, self.wf_data.id)},
"name": self.wf_data.data['name'],
"manufacturer": "PetKit",
"model": WATER_FOUNTAINS[self.wf_data.type],
"model": WATER_FOUNTAINS.get(self.wf_data.data["typeCode"], "Unidentified Water Fountain") if "typeCode" in self.wf_data.data else "Unidentified Water Fountain",
"sw_version": f'{self.wf_data.data["hardware"]}.{self.wf_data.data["firmware"]}'
}

Expand Down Expand Up @@ -315,7 +315,7 @@ def device_info(self) -> dict[str, Any]:
"identifiers": {(DOMAIN, self.wf_data.id)},
"name": self.wf_data.data['name'],
"manufacturer": "PetKit",
"model": WATER_FOUNTAINS[self.wf_data.type],
"model": WATER_FOUNTAINS.get(self.wf_data.data["typeCode"], "Unidentified Water Fountain") if "typeCode" in self.wf_data.data else "Unidentified Water Fountain",
"sw_version": f'{self.wf_data.data["hardware"]}.{self.wf_data.data["firmware"]}'
}

Expand Down Expand Up @@ -385,7 +385,7 @@ def device_info(self) -> dict[str, Any]:
"identifiers": {(DOMAIN, self.wf_data.id)},
"name": self.wf_data.data['name'],
"manufacturer": "PetKit",
"model": WATER_FOUNTAINS[self.wf_data.type],
"model": WATER_FOUNTAINS.get(self.wf_data.data["typeCode"], "Unidentified Water Fountain") if "typeCode" in self.wf_data.data else "Unidentified Water Fountain",
"sw_version": f'{self.wf_data.data["hardware"]}.{self.wf_data.data["firmware"]}'
}

Expand Down
6 changes: 3 additions & 3 deletions custom_components/petkit/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def device_info(self) -> dict[str, Any]:
"identifiers": {(DOMAIN, self.wf_data.id)},
"name": self.wf_data.data['name'],
"manufacturer": "PetKit",
"model": WATER_FOUNTAINS[self.wf_data.type],
"model": WATER_FOUNTAINS.get(self.wf_data.data["typeCode"], "Unidentified Water Fountain") if "typeCode" in self.wf_data.data else "Unidentified Water Fountain",
"sw_version": f'{self.wf_data.data["hardware"]}.{self.wf_data.data["firmware"]}'
}

Expand Down Expand Up @@ -214,7 +214,7 @@ def device_info(self) -> dict[str, Any]:
"identifiers": {(DOMAIN, self.wf_data.id)},
"name": self.wf_data.data['name'],
"manufacturer": "PetKit",
"model": WATER_FOUNTAINS[self.wf_data.type],
"model": WATER_FOUNTAINS.get(self.wf_data.data["typeCode"], "Unidentified Water Fountain") if "typeCode" in self.wf_data.data else "Unidentified Water Fountain",
"sw_version": f'{self.wf_data.data["hardware"]}.{self.wf_data.data["firmware"]}'
}

Expand Down Expand Up @@ -324,7 +324,7 @@ def device_info(self) -> dict[str, Any]:
"identifiers": {(DOMAIN, self.wf_data.id)},
"name": self.wf_data.data['name'],
"manufacturer": "PetKit",
"model": WATER_FOUNTAINS[self.wf_data.type],
"model": WATER_FOUNTAINS.get(self.wf_data.data["typeCode"], "Unidentified Water Fountain") if "typeCode" in self.wf_data.data else "Unidentified Water Fountain",
"sw_version": f'{self.wf_data.data["hardware"]}.{self.wf_data.data["firmware"]}'
}

Expand Down

0 comments on commit f134e2e

Please sign in to comment.