Skip to content

Instantly share code, notes, and snippets.

@bwarden
bwarden / post-process.sh
Last active December 13, 2021 05:28 — forked from thornbill/post-process.sh
DVR post processing script for Jellyfin
#!/usr/bin/env bash
set -o errexit
set -o pipefail
set -o nounset
set -o xtrace
PWD="$(pwd)"
die () {
diff --git a/home_assistant/custom_components/switch.py b/home_assistant/custom_components/switch.py
index 841b2a4..2f9d26f 100644
--- a/home_assistant/custom_components/switch.py
+++ b/home_assistant/custom_components/switch.py
@@ -51,7 +51,10 @@ class VeSyncSwitchHA(SwitchDevice):
@property
def unique_id(self):
"""Return the ID of this switch."""
- return self.smartplug.cid
+ if hasattr(self.smartplug, 'sub_device_no'):

Keybase proof

I hereby claim:

  • I am bwarden on github.
  • I am bwarden (https://keybase.io/bwarden) on keybase.
  • I have a public key ASBjRCYIvW2A4j3JVVZBEloBopc_q6Yii3FXQHU-tBoaSQo

To claim this, I am signing this object: