Sensor entities created in AppDaemon not visible in Home Assistant

(Code snippets below has been edited to hide sensitive information)
I have an app that creates multiple sensors in AppDaemon, ex.py
From dashboard at port 5050, I can see each entity under the entities tab and namespace “default”, the state value and attributes are as expected. Under the plugin tab there is nothing.

I expected to see the same entities in Home Assistant, but they never show up. I have tried restarting both HA and AppDaemon.

I’ve tried searching, and reading the AppDaemon docs, but can’t figure out why the entities are not visible in Home Assistant.

appdaemon.yaml

appdaemon:
  latitude: xx.xxxxx
  longitude: x.xxxxx
  elevation: 2
  time_zone: Europe/Amsterdam
  plugins:
    HASS:
      type: hass
      ha-url: http://xxx.x.x.x:xxxx
      token: xxxxxxx
      namespace: default

http:
  url: http://xxx.x.x.x:5050
admin:
api:

apps.yaml:

example:
    module: ex
    class: example

ex.py:

import hassapi as hass
import requests
from datetime import date, datetime, timedelta
import json


class example(hass.Hass):

  def initialize(self):
    self.log("example")
    starttime = datetime.now() + timedelta(seconds=5)      
    self.run_every(self.checkup,starttime,600)

    
  def checkup(self, kwargs):
    headers = {
    'accept': 'application/json',
    'referer': 'url',
    'user-agent': 'Mozilla.....',
}

    params = {
    'from': '2024-12-30',
    'to': '2025-01-01',
    'today': '0',
    'location': 'gdfghdjkg-gdfgdfg-dfgdfgd',
}

    response = requests.get(
    'url2',
    params=params,
    headers=headers,
)
    points = response.json()
    nr = 0
    for point in points["key"]:
      nr += 1
      name = point["key2"]["name"]
      name2 = point["key3"]["name"]

      self.sensorname = ("sensor.point_%s" % nr)
      self.set_state(self.sensorname, state = name, attributes = {"name number 2": name2 })

Hi, I don’t have much experience with python, but I have created some sensors via AppDaemon. If the entity doesn’t exist in HA, a new one is created just like in AppDaemon… I think the problem is in this part

Try setting the entity_id like this…

sensor_entity = f"sensor.point_{nr}"
sensor_state = name
sensor_attributes = {
  "name number 2": name2
}

self.set_state(
  sensor_entity, 
  state=sensor_state, 
  attributes=sensor_attributes
)

Thanks for the respond.

I found the issue at last. In the AppDaemon configuration I have added Pandas to be imported. Pandas loads NumPy.
The issue is that “np.float”, which was deprecated in NumPy 2.0, is used in the code that loads HASS.
“np.float64” would be correct.

If you find the file I guess you could correct directly, np.float to np.float64, or you can make sure a NumPy version below 2.0 is used.

AttributeError: `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead.

What I did:
AppDaemon add-on →
Configuration tab →
Options →
Packages: add “Numpy==1.26.4” (or other version below 2.0)

For me, all sensors are now visible in Home Assistant as expected.