Files
core/homeassistant/generated/zeroconf.py
Geoff eff35e93bd New core integration for VegeHub (#129598)
* Initial commit for VegeHub integration

* Moved several pieces to library, continuing.

* All device contact moved to library

* Updated documentation link

* Fixed an error in strings.json

* Removed commented out code and unused file

* Removed unneeded info logging, and a few missed lines of commented code

* Added/removed comments for clarity

* Converted integration to use webhooks.

* Update __init__.py to remove unnecessary code.

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Remove unnecessary code from config_flow.py

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Simplify unique_id assertion.

* Switch to CONF_ constant for user input

* Added explanation for passing exception.

* Got rid of try-except, since I don't really handle the exceptions her anyway.

* Moved data transform to vegehub library

* Changed references to use HA constants.

* Fixed assigning and returning _attr properties.

* Moved temperature sensor transform to the library.

* Moved sensor names to strings.json

* Made webhook names unique to avoid collisions when multiple devices are added.

* Converted to using entry.runtime_data

* Removed options flow for first PR

* Removed switch support to limit PR to one platform

* Removed/updated outdated tests

* Update homeassistant/components/vegehub/__init__.py

Co-authored-by: Josef Zweck <josef@zweck.dev>

* Got rid of strings in favor of constants.

* Got rid of unnecessary check

* Imported constant directly.

* Added custom type for entry

* Expanded CONF_ constants into sensor.py

* Get rid of extra `str` and `get`

Co-authored-by: Josef Zweck <josef@zweck.dev>

* Added type to errors

* Added try/except to MAC address retrieval

* Moved functionality out of ConfigFlow that shouldn't have been there

* Removed IP:MAC tracking from ConfigFlow

* Added retries to VegeHub PyPI package, and implemented them in integration

* Removed different sensor types for now

* Fixed typo

* Changed abort to error

* Fixed error reporting in config flow

* Further simplify sensor.py to handle all sensors the same

* Added comment to clarify

* Got rid of unused constants

* Removed unused strings in strings.json

* Added quality_scale.yaml

* Fixed problems in sensor init

* Moved config url and sw version storage into vegehub package

* Get rid of extra declaration

Co-authored-by: Josef Zweck <josef@zweck.dev>

* Removed unnecessary task

* Fix type for entry

* Added a test before setup

* Fixed tests and got test coverage of config flow to 100%

* Fixed test descriptions

* Implemented a coordinator

* Removed unused property

* Fixed a few minor issues with the coordinator implementation

* Removed unused function

* Fixed some tests

* Trying to fix a problem with re-initialization when server reboots. Mostly working.

* Moved hub.setup from async_setup_entry to config flow to avoid running it on system reboot

* Delete tests/testing_config/.storage/http.auth

* Fixed errors in coordinator.py

* Added IP validation for manual input IP addresses

* Moved data into self._discovered to simplify

* Removed redundant typing

* Shortened sensor unique ID and added coordinator handler

* Added call to super()._handle_coordinator_update() so state gets handled correctly

* Fixed == and is

* Got rid of "slot" and moved functionality to lib

* Got rid of mocked aiohttp calls in favor of just mocking the vegehub library

* Rewrote config flow to make more sense.

* Changed order of data and data_description

* Changes to sensor.py

* Got rid of async_update_data in coordinator and moved async_set_updated_data into webhook callback

* Changed sensor updates so that they keep using last known values if update doesn't contain data for them

* Changed config flow to use homeassistant.helpers.service_info zeroconf instead of homeassistant.components zeroconf

* Added types to test parameters

* Changes and notes in config_flow.py

* Minor fix to get existing tests working before making changes to tests

* Removed unused data and simplified data passing

* Fixed tests, removed unused data, moved sensor tests to snapshots

* Mocked async_setup_entry and async_unload_entry

* Eliminated retry step so that retries just happen in the user flow or zeroconf_confirm

* Bumped the library version

* Bumped library version again

* Changed test-before-setup test

* Improved use of coordinator

* Almost done reworking tests. A few more changes still needed.

* Added via device to sensor.py and key reference to strings.json

* Webhook tests are almost, but not quite, working

* Fully functional again

* Change error to assert

* made identifiers and via_device the same

* made the via_device just be the mac

* Fixed strings.json and updated translations

* Fixed test_sensor.py

* Cleaned up tests and added autouse to several fixtures to simplify

* Switched from error to assert, and added exemption to quality scale.

* Cleaned up some tests and added update of IP if unique ID of discovered device is the same.

* Improved zeroconfig to update IP and hostname, and added a test to make sure those work.

* Fixed a comment.

* Improved ip/hostname update test.

* Changed Hub to VegeHub in strings.json for clarity.

* Switched to using a base entity to simplify and make adding platforms in the future easier.

* Moved the vegehub object into the coordinator to simplify.

* Removed actuators from sensors, and added unique name for battery sensor

* Changed coordinator to manage its own data, changed sensors to use descriptions and return their value as a property

* Updated data retrieval keys

* Minor updates to several files

* Fixed a few things for pytest

* Reverted to explicit check for None for pytest

* Fixed a comment and a variable name

* Fixed a comment

* Fix

* Bumped depenency version to eliminate pytest from dependencies.

---------

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
Co-authored-by: Josef Zweck <josef@zweck.dev>
Co-authored-by: Joostlek <joostlek@outlook.com>
2025-06-24 06:55:34 +02:00

973 lines
19 KiB
Python
Generated

"""Automatically generated file.
To update, run python3 -m script.hassfest
"""
HOMEKIT = {
"3810X": {
"always_discover": True,
"domain": "roku",
},
"3820X": {
"always_discover": True,
"domain": "roku",
},
"4660X": {
"always_discover": True,
"domain": "roku",
},
"7820X": {
"always_discover": True,
"domain": "roku",
},
"AC02": {
"always_discover": True,
"domain": "tado",
},
"Abode": {
"always_discover": True,
"domain": "abode",
},
"BSB002": {
"always_discover": False,
"domain": "hue",
},
"C105X": {
"always_discover": True,
"domain": "roku",
},
"C135X": {
"always_discover": True,
"domain": "roku",
},
"EB": {
"always_discover": True,
"domain": "ecobee",
},
"Escea": {
"always_discover": False,
"domain": "escea",
},
"HHKBridge*": {
"always_discover": True,
"domain": "hive",
},
"Healthy Home Coach": {
"always_discover": True,
"domain": "netatmo",
},
"Iota": {
"always_discover": True,
"domain": "abode",
},
"LIFX A19": {
"always_discover": True,
"domain": "lifx",
},
"LIFX A21": {
"always_discover": True,
"domain": "lifx",
},
"LIFX BR30": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Beam": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Candle": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Ceiling": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Clean": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Color": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Colour": {
"always_discover": True,
"domain": "lifx",
},
"LIFX DLCOL": {
"always_discover": True,
"domain": "lifx",
},
"LIFX DLWW": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Dlight": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Downlight": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Filament": {
"always_discover": True,
"domain": "lifx",
},
"LIFX GU10": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Indoor Neon": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Lightstrip": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Luna": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Mini": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Neon": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Nightvision": {
"always_discover": True,
"domain": "lifx",
},
"LIFX PAR38": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Permanent Outdoor": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Pls": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Plus": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Round": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Square": {
"always_discover": True,
"domain": "lifx",
},
"LIFX String": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Tile": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Tube": {
"always_discover": True,
"domain": "lifx",
},
"LIFX White": {
"always_discover": True,
"domain": "lifx",
},
"LIFX Z": {
"always_discover": True,
"domain": "lifx",
},
"NL29": {
"always_discover": False,
"domain": "nanoleaf",
},
"NL42": {
"always_discover": False,
"domain": "nanoleaf",
},
"NL47": {
"always_discover": False,
"domain": "nanoleaf",
},
"NL48": {
"always_discover": False,
"domain": "nanoleaf",
},
"NL52": {
"always_discover": False,
"domain": "nanoleaf",
},
"NL59": {
"always_discover": False,
"domain": "nanoleaf",
},
"NL69": {
"always_discover": False,
"domain": "nanoleaf",
},
"NL81": {
"always_discover": False,
"domain": "nanoleaf",
},
"Netatmo Relay": {
"always_discover": True,
"domain": "netatmo",
},
"PowerView": {
"always_discover": True,
"domain": "hunterdouglas_powerview",
},
"Presence": {
"always_discover": True,
"domain": "netatmo",
},
"Rachio": {
"always_discover": True,
"domain": "rachio",
},
"SPK5": {
"always_discover": True,
"domain": "rainmachine",
},
"Sensibo": {
"always_discover": True,
"domain": "sensibo",
},
"Smart Bridge": {
"always_discover": False,
"domain": "lutron_caseta",
},
"Socket": {
"always_discover": False,
"domain": "wemo",
},
"TRADFRI": {
"always_discover": True,
"domain": "tradfri",
},
"Touch HD": {
"always_discover": True,
"domain": "rainmachine",
},
"Welcome": {
"always_discover": True,
"domain": "netatmo",
},
"Wemo": {
"always_discover": False,
"domain": "wemo",
},
"YL*": {
"always_discover": False,
"domain": "yeelight",
},
"ecobee*": {
"always_discover": True,
"domain": "ecobee",
},
"iSmartGate": {
"always_discover": True,
"domain": "gogogate2",
},
"iZone": {
"always_discover": True,
"domain": "izone",
},
"tado": {
"always_discover": True,
"domain": "tado",
},
}
ZEROCONF = {
"_PowerView-G3._tcp.local.": [
{
"domain": "hunterdouglas_powerview",
},
],
"_Volumio._tcp.local.": [
{
"domain": "volumio",
},
],
"_aicu-http._tcp.local.": [
{
"domain": "romy",
},
],
"_airgradient._tcp.local.": [
{
"domain": "airgradient",
},
],
"_airplay._tcp.local.": [
{
"domain": "apple_tv",
"properties": {
"model": "appletv*",
},
},
{
"domain": "apple_tv",
"properties": {
"model": "audioaccessory*",
},
},
{
"domain": "apple_tv",
"properties": {
"am": "airport*",
},
},
{
"domain": "samsungtv",
"properties": {
"manufacturer": "samsung*",
},
},
],
"_airport._tcp.local.": [
{
"domain": "apple_tv",
},
],
"_altruist._tcp.local.": [
{
"domain": "altruist",
},
],
"_amzn-alexa._tcp.local.": [
{
"domain": "roomba",
"name": "irobot-*",
},
{
"domain": "roomba",
"name": "roomba-*",
},
],
"_androidtvremote2._tcp.local.": [
{
"domain": "androidtv_remote",
},
],
"_api._tcp.local.": [
{
"domain": "baf",
"properties": {
"model": "haiku*",
},
},
{
"domain": "baf",
"properties": {
"model": "i6*",
},
},
],
"_api._udp.local.": [
{
"domain": "guardian",
},
],
"_appletv-v2._tcp.local.": [
{
"domain": "apple_tv",
},
],
"_axis-video._tcp.local.": [
{
"domain": "axis",
"properties": {
"macaddress": "00408c*",
},
},
{
"domain": "axis",
"properties": {
"macaddress": "accc8e*",
},
},
{
"domain": "axis",
"properties": {
"macaddress": "b8a44f*",
},
},
{
"domain": "axis",
"properties": {
"macaddress": "e82725*",
},
},
{
"domain": "doorbird",
"properties": {
"macaddress": "1ccae3*",
},
},
],
"_bangolufsen._tcp.local.": [
{
"domain": "bang_olufsen",
},
],
"_bbxsrv._tcp.local.": [
{
"domain": "blebox",
},
],
"_bond._tcp.local.": [
{
"domain": "bond",
},
],
"_companion-link._tcp.local.": [
{
"domain": "apple_tv",
},
],
"_czc._tcp.local.": [
{
"domain": "zha",
"name": "czc*",
},
],
"_daap._tcp.local.": [
{
"domain": "forked_daapd",
},
],
"_deako._tcp.local.": [
{
"domain": "deako",
},
],
"_devialet-http._tcp.local.": [
{
"domain": "devialet",
},
],
"_dkapi._tcp.local.": [
{
"domain": "daikin",
},
],
"_dvl-deviceapi._tcp.local.": [
{
"domain": "devolo_home_control",
},
{
"domain": "devolo_home_network",
"properties": {
"MT": "*",
},
},
],
"_easylink._tcp.local.": [
{
"domain": "modern_forms",
"name": "wac*",
},
],
"_ecobee._tcp.local.": [
{
"domain": "ecobee",
},
],
"_elg._tcp.local.": [
{
"domain": "elgato",
},
],
"_elmax-ssl._tcp.local.": [
{
"domain": "elmax",
},
],
"_enphase-envoy._tcp.local.": [
{
"domain": "enphase_envoy",
},
],
"_esphomelib._tcp.local.": [
{
"domain": "esphome",
},
{
"domain": "zha",
"name": "tube*",
},
],
"_fbx-api._tcp.local.": [
{
"domain": "freebox",
},
],
"_googlecast._tcp.local.": [
{
"domain": "cast",
},
],
"_hap._tcp.local.": [
{
"domain": "homekit_controller",
},
{
"domain": "zwave_me",
"name": "*z.wave-me*",
},
],
"_hap._udp.local.": [
{
"domain": "homekit_controller",
},
],
"_homeconnect._tcp.local.": [
{
"domain": "home_connect",
},
],
"_homekit._tcp.local.": [
{
"domain": "homekit",
},
],
"_homewizard._tcp.local.": [
{
"domain": "homewizard",
},
],
"_hscp._tcp.local.": [
{
"domain": "apple_tv",
},
],
"_http._tcp.local.": [
{
"domain": "awair",
"name": "awair*",
},
{
"domain": "bosch_shc",
"name": "bosch shc*",
},
{
"domain": "eheimdigital",
"name": "eheimdigital._http._tcp.local.",
},
{
"domain": "lektrico",
"name": "lektrico*",
},
{
"domain": "loqed",
"name": "loqed*",
},
{
"domain": "nam",
"name": "nam-*",
},
{
"domain": "nam",
"properties": {
"manufacturer": "nettigo",
},
},
{
"domain": "peblar",
"name": "pblr-*",
},
{
"domain": "powerfox",
"name": "powerfox*",
},
{
"domain": "pure_energie",
"name": "smartbridge*",
},
{
"domain": "rachio",
"name": "rachio*",
},
{
"domain": "rainmachine",
"name": "rainmachine*",
},
{
"domain": "shelly",
"name": "shelly*",
},
{
"domain": "slide_local",
"name": "slide*",
},
{
"domain": "synology_dsm",
"properties": {
"vendor": "synology*",
},
},
{
"domain": "tailwind",
"properties": {
"vendor": "tailwind",
},
},
],
"_hue._tcp.local.": [
{
"domain": "hue",
},
],
"_hwenergy._tcp.local.": [
{
"domain": "homewizard",
},
],
"_iometer._tcp.local.": [
{
"domain": "iometer",
},
],
"_ipp._tcp.local.": [
{
"domain": "ipp",
},
],
"_ipps._tcp.local.": [
{
"domain": "ipp",
},
],
"_kizbox._tcp.local.": [
{
"domain": "overkiz",
"name": "gateway*",
},
],
"_kizboxdev._tcp.local.": [
{
"domain": "overkiz",
"name": "gateway*",
},
],
"_linkplay._tcp.local.": [
{
"domain": "linkplay",
},
],
"_lookin._tcp.local.": [
{
"domain": "lookin",
},
],
"_lutron._tcp.local.": [
{
"domain": "lutron_caseta",
"properties": {
"SYSTYPE": "hwqs*",
},
},
{
"domain": "lutron_caseta",
"properties": {
"SYSTYPE": "radiora3*",
},
},
{
"domain": "lutron_caseta",
"properties": {
"SYSTYPE": "smartbridge*",
},
},
{
"domain": "lutron_caseta",
"properties": {
"SYSTYPE": "ra2select*",
},
},
],
"_mass._tcp.local.": [
{
"domain": "music_assistant",
},
],
"_matter._tcp.local.": [
{
"domain": "matter",
},
],
"_matterc._udp.local.": [
{
"domain": "matter",
},
],
"_mediaremotetv._tcp.local.": [
{
"domain": "apple_tv",
},
],
"_meshcop._udp.local.": [
{
"domain": "thread",
},
],
"_mieleathome._tcp.local.": [
{
"domain": "miele",
},
],
"_miio._udp.local.": [
{
"domain": "xiaomi_aqara",
},
{
"domain": "xiaomi_miio",
},
{
"domain": "yeelight",
"name": "yeelink-*",
},
],
"_musc._tcp.local.": [
{
"domain": "bluesound",
},
],
"_nanoleafapi._tcp.local.": [
{
"domain": "nanoleaf",
},
],
"_nanoleafms._tcp.local.": [
{
"domain": "nanoleaf",
},
],
"_nut._tcp.local.": [
{
"domain": "nut",
},
],
"_octoprint._tcp.local.": [
{
"domain": "octoprint",
},
],
"_owserver._tcp.local.": [
{
"domain": "onewire",
},
],
"_plexmediasvr._tcp.local.": [
{
"domain": "plex",
},
],
"_plugwise._tcp.local.": [
{
"domain": "plugwise",
},
],
"_powerview._tcp.local.": [
{
"domain": "hunterdouglas_powerview",
},
],
"_printer._tcp.local.": [
{
"domain": "brother",
"name": "brother*",
},
],
"_rabbitair._udp.local.": [
{
"domain": "rabbitair",
},
],
"_raop._tcp.local.": [
{
"domain": "apple_tv",
"properties": {
"am": "appletv*",
},
},
{
"domain": "apple_tv",
"properties": {
"am": "audioaccessory*",
},
},
{
"domain": "apple_tv",
"properties": {
"am": "airport*",
},
},
],
"_rio._tcp.local.": [
{
"domain": "russound_rio",
},
],
"_shelly._tcp.local.": [
{
"domain": "shelly",
},
],
"_sideplay._tcp.local.": [
{
"domain": "ecobee",
"properties": {
"mdl": "eb-*",
},
},
{
"domain": "ecobee",
"properties": {
"mdl": "ecobee*",
},
},
],
"_sleep-proxy._udp.local.": [
{
"domain": "apple_tv",
},
],
"_slzb-06._tcp.local.": [
{
"domain": "smlight",
},
{
"domain": "zha",
"name": "slzb-06*",
},
],
"_smoip._tcp.local.": [
{
"domain": "cambridge_audio",
},
],
"_sonos._tcp.local.": [
{
"domain": "sonos",
},
],
"_soundtouch._tcp.local.": [
{
"domain": "soundtouch",
},
],
"_ssh._tcp.local.": [
{
"domain": "smappee",
"name": "smappee1*",
},
{
"domain": "smappee",
"name": "smappee2*",
},
{
"domain": "smappee",
"name": "smappee50*",
},
],
"_stream-magic._tcp.local.": [
{
"domain": "cambridge_audio",
},
],
"_system-bridge._tcp.local.": [
{
"domain": "system_bridge",
},
],
"_technove-stations._tcp.local.": [
{
"domain": "technove",
},
],
"_touch-able._tcp.local.": [
{
"domain": "apple_tv",
},
],
"_tvm._tcp.local.": [
{
"domain": "motionmount",
},
],
"_uzg-01._tcp.local.": [
{
"domain": "zha",
"name": "uzg-01*",
},
],
"_vege._tcp.local.": [
{
"domain": "vegehub",
},
],
"_viziocast._tcp.local.": [
{
"domain": "vizio",
},
],
"_wled._tcp.local.": [
{
"domain": "wled",
},
],
"_wyoming._tcp.local.": [
{
"domain": "wyoming",
},
],
"_xbmc-jsonrpc-h._tcp.local.": [
{
"domain": "kodi",
},
],
"_xzg._tcp.local.": [
{
"domain": "zha",
"name": "xzg*",
},
],
"_zigate-zigbee-gateway._tcp.local.": [
{
"domain": "zha",
"name": "*zigate*",
},
],
"_zigbee-coordinator._tcp.local.": [
{
"domain": "zha",
"name": "*",
},
],
"_zigstar_gw._tcp.local.": [
{
"domain": "zha",
"name": "*zigstar*",
},
],
"_zwave-js-server._tcp.local.": [
{
"domain": "zwave_js",
},
],
}