Tutorial on making a ESPHome External Component from scratch

I made a tutorial about building an ESPHome external component for an i2c encoder. I’ve seen suggestions that this is how components should be made, but I couldn’t find much documentation so I figured it out and made it. Let me know if you have suggestions!

Blog post:

Youtube Video:

4 Likes

Thought to share with you something cool “I think”, that might be fun to include in your documentation. Make Homething node, display/subscribe to Home Assistant "notify.notify" service events . · Issue #138 · landonr/homeThing · GitHub
This sparked the following idea and wanted to share back with you guys.

Add the following to esphome config file.

api:
  encryption:
    key: !secret api

  services:
    - service: notify_homething
      variables:
        title: string
        message: string
        # type_str: string
      then:
        - lambda: |-
            id(homeThingMenu)->addNotification(title, message, "", true);

#Configuration.yaml on the hass side, profit :wink:

notify:
  - platform: group
    name: "Notify Homething"
    services:
      - service: esphome ##propagates the notify.notify events back to the variables and calls back the service.
        data:
          target: studiotdisplay_notify_homething