How to change attributes of a discover mqtt entity? forever to static

Hi i am playing with a docker image that publishes an alarm control panel with mqtt autodiscovery
so when i start HA, and afterwards the docker, it creates automaticy an entity, in my case an alarm_control_panel

but how to change the attributes, so its really static forever?
in example screenshow below, the arm_code_required = true, i want it to make it false forever?

if i change it there, after a reboot, the config is lost

thnx!

I’m not sure that’s the right thing to do. Your integration should take care of that.
Namely, arm_code_required is not a const - it changes and when it’s true (for example, the alarm is set), Lovelace displays a keypad, but when you disarm, keypad disappears because arm_code_required changes to false. Well, that’s how I treat it :wink:

yeah, i know what the attribute does, i dont want the keypad
now i created a manually alarm_control_panel with the right topics
but, when i restart tha docker, because autodiscovery is on, it creates a second alarm control panel :slight_smile:
i dont need that, actually i just want to change attribiues of an auto discovered entity :wink:

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 :slight_smile:

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?

did you read this btw? and this?
and anything mqtt-related in your ./storage?

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
1 Like

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.

1 Like

Indeed , going for the manual road also

Thnx anyway!

It says nothing about overriding attributes in the docs :frowning: - 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 :wink:

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.