Customize entitie

Hello,

I have problems with 2 kinds of entities:

  - platform: dnsip
    name: IP WAN
    hostname: xxxxxxxxxxxxxxxxxxxxxxx
    resolver: 1.1.1.1
    scan_interval: 3600
    
    
  - platform: filesize
    file_paths:
      - /config/home-assistant_v2.db
      - /config/home-assistant.log

I can’t customize them, i have this error:

extra keys not allowed @ data['customize']['xxxxxx']

with xxxxx entity name.

(I can’t with GUI:
image
sensor doesn’t have entity_id…)

How can i change the name and the icon please ?

Can you please show the code that you use for customize?
It should be:

homeassistant:
  customize:
    sensor.ip_wan:
      icon: ....
      friendly_name: ...

See here for more details:

Jonathan is trying to use the Customise section in the GUI rather than editing the YAML for it. I’ve got a bit of both in my config and never had the issue he has so not really sure why it’s happening…

He tried both.
GUI customization only works if the entity has a unique_id (that’s what the error message says). Some integrations provide a unique_id for their entities and some don’t. Manually configured entities don’t have a unique_id by default, but for some you can add it manually in YAML.
From the docs it doesn’t look like you can configure unique_id for the file sensor, therefore it can only be custonized in YAML.

1 Like

Hi @Burningstone @sparkydave,

This is a part of my code in configuration.yaml:

homeassistant:
  name: Maison
  latitude: 46.4065
  longitude: -0.4795
  unit_system: metric
  time_zone: Europe/Paris
  customize: !include customize.yaml
  whitelist_external_dirs:
    - '/config/'

And customize.yaml:

climate.chambre_jonathan_radiateur:
 min_temp: 12
 max_temp: 26
 initial_hvac_mode: "off"
 cold_tolerance: 0
 hot_tolerance: 0
 precision: 0.5
 
sensor.android_jonathan_pas:
 icon: hass:walk
 
sensor.android_brigitte_pas:
 icon: hass:walk
 
sensor.android_jacques_pas:
 icon: hass:walk

home-assistant_v2.db:
 icon: hass:database

I also tried with:

sensor.home-assistant_v2.db:
  icon: hass:database

I tried the GUI, and the YAML.

Entity_ids don’t contain dashes, change to this:

sensor.home_assistant_v2.db:
  icon: hass:database
1 Like

Wow niiice !
It works with:

sensor.home_assistant_v2_db:
  icon: hass:database