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:

8 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

Your link to homething.io is broken. Sounded promising…

I recall seeing it sometime ago. I don’t recall it helping much. I don’t believe it had any more than the video.

Is your interest in making a custom component (hard unless you are well versed in the HA and esphome concepts and c++ and Python and firmware development) or the actual device he made?

This link might help some:

Thanks Neel, I just wanted to fork and adapt a custom component for a Toshiba AC and was trying to figure out where to start. I finally managed to decipher the external components approach in ESPHome with the help of AI. The component is now working:

https://github.com/makusets/esphome-toshiba-ab

Thanks for responding,

Miquel

1 Like