Sensehat integration

Because the integration of sensehat is gone, i’m trying to make it work in a different way. I’m trying to use a python script to transfer the sensor data from the sensehat (temperature, humidity and pressure) to homeassistant. In configuration.yaml recieving the sensor data and place it in a template. It doesn’t really work out yet. Somebody have any ideas or other solutions?

from sense_hat import SenseHat
sense = SenseHat()

entity_id = data.get("entity_id")

temperature =  sense.get_temperature()
humidity = sense.get_humidity()
pressure = sense.get_pressure()

service_data = {"entity_id": entity_id, "temperature": temperature, "humidity":>
hass.services.call("sensehat", service_data)
1 Like

Why not use the old integration as a custom component?