{
  buildHomeAssistantComponent,
  fetchFromGitHub,
  pkgs,
  namespace,
  ...
}:
buildHomeAssistantComponent rec {
  owner = "SecKatie";
  domain = "wyzeapi";
  version = "0.1.35";

  src = fetchFromGitHub {
    owner = owner;
    repo = "ha-wyzeapi";
    rev = version;
    hash = "sha256-J9VFNImri0xF8RfND1bZl12CreKA023eHsXFNVt1YNQ=";
  };

  nativeBuildInputs = with pkgs.${namespace}; [
    wyzeapy
  ];

  postPatch = ''
    substituteInPlace custom_components/wyzeapi/manifest.json \
      --replace '"wyzeapy>=0.5.28,<0.6"' '"wyzeapy>=0.5.27,<0.6"'
  '';

  meta = {
    changelog = "https://github.com/SecKatie/ha-wyzeapi/releases/tag/${version}";
    description = "This is a custom component to allow control of various Wyze devices in Home Assistant using the unofficial API.";
    homepage = "https://github.com/SecKatie/ha-wyzeapi";
    maintainers = [ ];
  };
}
