A Home Assistant sensor that pulls the URL of webcomic image, given the webcomic URL. I tested on a few webcomics (Penny Arcade, Mr. Lovenstein, Awkward Zombie) and they work. Compatibility is on a case-by-case basis, as every website has different ways of labeling their images in HTML.
Use with Useful Markdown Card to display the webcomic in a Lovelace card.
The latest version of this sensor is compatible with Home Assistant 0.89 or later. Previous versions of Home Assistant are no longer supported, though you can download release v0.0.1 of this sensor if you want to continue using on old versions of HA.
- Instagram scraping added. Type in name of the Instagram user in the configuration to pull the latest posted IG photo.
Name | Type | Default | Description |
---|---|---|---|
name | string | Required | Name of the webcomic, such as Awkward Zombie . |
source | strong | Required | Two options, 'url' or 'instagram'. This is where the webcomic is hosted. |
url | string | Optional | The URL of the webcomic, such as https://www.awkwardzombie.com/ |
ig_user | string | Optional | Type in the Instagram user name of the web comic. For example, 'system32comics'. |
- In your config/custom_components folder, create a folder called
webcomic
- Download the
__init__.py
, manifest.json, and sensor.py and save inconfig/custom_components/webcomic
- Include one of the following sensors in your
configuration.yaml
- platform: webcomic
name: "Awkward Zombie"
source: url
url: "https://www.awkwardzombie.com/"
- platform: webcomic
name: "System32 Comics"
source: instagram
ig_user: system32comics
- Restart Home Assistant to load the sensor.
- Check
Home Assistant >> Developer Tools >> States
to see if the sensor loaded correctly. - If the sensor state is
URL found
and the URL attribute is defined, then the webcomic URL was identified (hopefully). - Download Useful Markdown Card and install per instructions.
- Add a
useful-markdown-card
in Lovelace and load the webcomic using the example below.
- type: custom:useful-markdown-card
content: >
![awkward]([[ sensor.awkward_zombie.attributes.url ]])
- type: custom:useful-markdown-card
content: >
![system32]([[ sensor.system32_comics.attributes.url ]])
I am studying Python as a hobby and this is my first public project. Some fixes/requests may be out of my scope but I'll try my best. I hope you find it useful!
- Useful Markdown Card - To display the comic in a Lovelace card.