Custom Component

Hi, trying to do my own custom component.
Created a folder named ‘sensor’ under custom_components and inside sensor folder created a python script called
Then, under configuration, added section like this:

  - platform: raspberry_temperature
    name: Raspberry Temperature
    host: raspberrypi.local
    port: 22
    username: pi
    password: raspberry

But whrn I try to restart HA i get following error:

Platform error sensor.raspberry_temperature - Integration ‘raspberry_temperature’ not found.

What Am I missing?

What you created isn’t a custom component, it’s a python script. Yet you are attempting to use the python script like a custom component so that’s why it fails to work.