dawidchyrzynski / arduino-home-assistant

ArduinoHA allows to integrate an Arduino/ESP based device with Home Assistant using MQTT.
https://dawidchyrzynski.github.io/arduino-home-assistant/
GNU Affero General Public License v3.0
485 stars 116 forks source link

Not all elements shows in HomeAssistant #113

Closed rozrabiak closed 1 year ago

rozrabiak commented 1 year ago

Not all defined components shows in HA. When I change order of elements then firsts elements shows but last not.. Wemos D1 mini. How to solve this?

Zrzut ekranu 2022-11-22 122758

In code I have:

HASensor haTempOdczyt("tempOdczyt");
HASensor haAktCzas("czasSterownika"); 
HASensor haNextRun("nastStartPompy"); 
HAButton haButtonA("haButonA"); 
HANumber hatZadana("tZadana", HANumber::PrecisionP0);
HANumber haInterwal("interwal", HANumber::PrecisionP0); 
HANumber haGodzinaStart("godzinaRano", HANumber::PrecisionP0); 
HANumber haMinutyStart("minutyRano", HANumber::PrecisionP0); 
HANumber haGodzinaNoc("godzinaNoc", HANumber::PrecisionP0);
HANumber haDeltaTemp("deltaTemp", HANumber::PrecisionP0); 

void setup()
{
  haDevice.setName("pump driver");
  haDevice.setSoftwareVersion("1.0.0");
  haDevice.setManufacturer("X.X.");

  haButtonA.onCommand(haButtonPompa);
  haButtonA.setIcon("mdi:fire");
  haButtonA.setName("pompa");
  haTempOdczyt.setIcon("mdi:temperature-celsius");
  haTempOdczyt.setName("tempOdczyt");
  haAktCzas.setName("aktCzas");
  haNextRun.setName("nastStartPompy");
  hatZadana.setName("tempZadana");
  hatZadana.setIcon("mdi:temperature-celsius");
  hatZadana.setMode(HANumber::ModeBox);
  hatZadana.setMin(30);
  hatZadana.setMax(50);
  hatZadana.setStep(5);
  haInterwal.setIcon("mdi:clock");
  haInterwal.setName("interwal");
  haInterwal.setMin(0);
  haInterwal.setMax(59);
  haInterwal.setStep(5);
  haInterwal.setMode(HANumber::ModeBox);
  haGodzinaStart.setIcon("mdi:clock");
  haGodzinaStart.setName("godzinaStart");
  haGodzinaStart.setMin(1);
  haGodzinaStart.setMax(23);
  haGodzinaStart.setStep(1);
  haGodzinaStart.setMode(HANumber::ModeBox);
  haMinutyStart.setIcon("mdi:clock");
  haMinutyStart.setName("minutyStart");
  haMinutyStart.setMin(0);
  haMinutyStart.setMax(59);
  haMinutyStart.setStep(1);
  haMinutyStart.setMode(HANumber::ModeBox);
  haGodzinaNoc.setIcon("mdi:clock");
  haGodzinaNoc.setName("godzinyNoc");
  haGodzinaNoc.setMin(20);
  haGodzinaNoc.setMax(23);
  haGodzinaNoc.setStep(1);
  haGodzinaNoc.setMode(HANumber::ModeBox);
  haDeltaTemp.setIcon("mdi:clock");
  haDeltaTemp.setName("deltaTemp");
  haDeltaTemp.setMin(5);
  haDeltaTemp.setMax(20);
  haDeltaTemp.setStep(1);
  haDeltaTemp.setMode(HANumber::ModeBox);
}
dawidchyrzynski commented 1 year ago

Hi @rozrabiak,

There is a default limit of types that can be registered. Please take a look at the documentation: https://dawidchyrzynski.github.io/arduino-home-assistant/documents/library/device-types.html

In your case, you should set the limit to 11.