@electrik, Yes it not showing automatically but when go through the configure UI button I was able to add my switches. Thank you everyone for all your help. Mysensors has a great community.
You don't have to configure the gateway, just tell Home assistant the gateway is there.
Did you follow the instructions in the link @BearWithBeard mentioned?
Please note the nodes you use have to follow the presentation guide lines, else HA won't detect them automatically.
https://www.home-assistant.io/integrations/mysensors/#presentation
@pw44 The HA integrations page has useful information of how it al works together, check the presentation paragraph as it is important in HA.
The node sketch shall make use of these defs for HA. Is it right?
So, on a node sensor, i can have from 0 to 255 child_id's, each with it's name. But how to give a name for each child, if more than one sensor is connected to the node?
The name can me customized in the presentation function in the description field:
https://www.mysensors.org/apidocs/group__MySensorsCoregrp.html#gaef20c35998db495bd4c85bac42a7ad49
bool present ( const uint8_t sensorId,
const mysensors_sensor_t sensorType,
const char * description = "",
const bool requestEcho = false
)
Is this all right? if not, please educate me in the right way.
And i'm also getting the following:
This entity does not have a unique ID, therefore its settings cannot be managed from the UI.
Any hint?
This is a normal error in current versions of HA, the mysensors integration is still manual via YAML and cannot be managed from the HA FrontEnd.
@Matt-McAllister Hi there, I know this is an old topic, but I've been experiencing the same issue. the way I got around it is by putting a:
delay(500);
between the two presentation statements.
I know this thread is old, but it might help others in future searches.
I simply deleted the child I no longer used from the persistence file, saved it and restarted Home Assistant.
The child was gone.
If you want to change a child to a new sensor this also works.
After restarting Home Assistant, power up the node and the child will present itself and update the persistence file.
Please read carefully the HA documentation: https://www.home-assistant.io/integrations/mysensors/
There it says that you need to present your node to HA by sending initial value of the node. Then HA adds it to its device list.
if (!initialValueSent) {
Serial.println("Sending initial value");
send(msg.set(state?RELAY_ON:RELAY_OFF));
Serial.println("Requesting initial value from controller");
request(CHILD_ID, V_STATUS);
wait(2000, C_SET, V_STATUS);
}