Repair warning won't go away

I renamed an espHome device name, and after each restart, I get this repair warning:

1 repair
halloween2024-castletour is not permitted to perform Home Assistant actions
The ESPHome device attempted to perform a Home Assistant action, but this functionality is not enabled.

If you trust this device and want to allow it to perfom Home Assistant action, you can enable this functionality in the options flow.

I open the device in …Devices and edit the settings, and the “Enable Device” is on:

enable-device

Can anyone think of an easy fix, or should I simply delete the device and reinstall it?

Probably this. It’s not totally uncommon that I’ll have random issues with an ESPHome device interacting with HA and a removal/rediscovery always fixes it.

Deleting and re-adding won’t fix this. If your device provides services (actions) you need to allow this in the config flow, like the repair says to do:

I thought I had. The device does not appear under its new name. But under the old name- twice.

The option for one of them was off and turning it on fixed the repair warning.
But, why is the device there two times and still with the old name?

How did you re-name it?

In the ESPHome Config?

If so the procedure for adding a new device (which is essentially what you are doing) on a previously used ESP board is to delete the device from Home Assistant first.

Delete both devices from HA (not esphome).

Restart.

Add the discovered ESP device.

Enable actions again.

You mean in settings → devices? They aren’t there. Only in ESPHome.

The old device name is also not in config/esphome.

I am not hesitant to delete everything and make a new device, but curious why this is happening.

You just said they were:

db1a370675255e14f27c91455c5e4928080e1175_2_517x267

That screenshot is in ESPHome. They are not in settings → devices.

That is not in the ESPHome dashboard. That is in the Devices & Services ESPHome Integration page.

ESPHome Dashboard (ESPHome):

ESPHome Integration page (home assistant)

Delete them here.

Thanks- done.