I donāt know how to do that, never used auto discovery.
Is it possible to disable it?
yeah, i can disable it and create every sensor manually
think i going for that road,
i thought it should be possible to edit an disovered mqtt entity, to remain static
well, if it re-creates it on every restart then noā¦ but we can only find out if we look at the code.
ok, gonna create the sensors and all stuff manually and then disable it
hmm, now disabled āauto entityesā in the mqtt intregration, when i restart docker, it creates again all the sensors
using this one : https://github.com/home-assistant/hassio-addons/tree/master/mosquitto
how to disable autodiscovery?
Ok, thnx , need to read some more
just add it to customization and it will stick forever, but you have to use the yaml customization, not the UI.
homeassistant:
customize:
alarm_control_panel.risco_alarm_panel_0:
code_arm_required: true
Aha! Thnx
Possible I can change also the name and friendly name thereā¦
Yeah, lots of things including friendly_name. You can override any attribute in the customize section. It does get wonky with some things, but it should always work.
But after some more trying with mqtt, gonna make it manual as sensorsā¦
Cause if i reboot HA, my sensor and panel are not visible anymore, untill I restart that dockerā¦
So gonna make all manual in yaml , then disable autodiscovery
I personally donāt use discovery. I hard code all my devices. Itās more overhead but they always work and never change names.
Indeed , going for the manual road also
Thnx anyway!
It says nothing about overriding attributes in the docs - how do you know about it?
Just yesterday I saw this and it apparently works - again, never saw that beforeā¦ perhaps because Iām not a huge customiser anyway
Marius is using the Custom UI integration. Thatās what allows for the use of templates
in customize.yaml
(and the templates use Javascript).
Do you mean that itās possible because of Custom UI?
Correct. Thatās one of the enhancements provided by the Custom UI integration.
so it has nothing to do with this topic, got it.
thanks
You can modify the discovery payload created by a physical device or even create your own entity via MQTT Discovery.
For example, run this script from the Services page and it will create a new entity called light.example
.
example_create:
alias: 'Create Example MQTT Light'
sequence:
service: mqtt.publish
data:
topic: 'homeassistant/light/example/config'
retain: true
payload: >
{
"name": "Example",
"unique_id": "ABC123",
"stat_t": "home/example",
"cmd_t": "home/example/set",
"bri_stat_t": "home/example/brightness",
"bri_cmd_t": "home/example/brightness/set"
}
The newly created entity will appear in States, Entities, and MQTT Integrations views.
Letās say you just ran the script and Home Assistant has created light.example
. Now you want to add an option like the color temperature state topic. Simply add it to the scriptās payload, (reload scripts), run it again and Home Assistant will not create a new entity but simply update the existing one. For example, Iāve added two topics for handling color temperature:
example_create:
alias: 'Create Example MQTT Light'
sequence:
service: mqtt.publish
data:
topic: 'homeassistant/light/example/config'
retain: true
payload: >
{
"name": "Example",
"unique_id": "ABC123",
"stat_t": "home/example",
"cmd_t": "home/example/set",
"bri_stat_t": "home/example/brightness",
"bri_cmd_t": "home/example/brightness/set",
"clr_temp_stat_t": "home/example/color",
"clr_temp_cmd_t": "home/example/color/set"
}
Running this revised script wonāt create a light.example_02
but simply update the existing one.
If you want to delete light.example
, run this script. It simply publishes an empty retained message to the entityās discovery topic.
example_delete:
alias: 'Delete Example MQTT Light'
sequence:
service: mqtt.publish
data:
topic: 'ha/light/example/config'
retain: true
payload: ''
NOTE: Deleting the entity this way will make Home Assistant remove the entity from States and Entities views. However, in the MQTT Integrations view it will mark the entity as Unavailable. In other words, the entity continues to exist in the entity registry. You can click the entity to reveal a dialog-box that allows you to Remove Entity (from the registry). Unfortunately, thereās a bug and it wonāt reveal that dialog-box until you restart Home Assistant. Iāve posted it as bug in the home-assistant-polymer repo (it may actually be due to a bug in the backend, not the frontend, but Iāll let the developers decide that).
trial by fire. Iāve had to do it for some zwave lights to get functionality.