Icons or Symbols on NSPanel

Hi all

I’m sure I am missing something stupidly obvious, but how do you configure which symbols are displayed on the nexion display suing Marc Fager’s repo?

I have 8 of these setup with incrementing IDs. The ID reports correctly in HA when pressed, but I want to populate the actual boxes on the NSPanel with mdi symboles:

  # Buttons on the Lights page
  - platform: nextion
    name: $device_name Hall Button 0
    page_id: 2
    component_id: 17
      - homeassistant.service:
          service: switch.toggle
  #        data:
   #         entity_id: light.hall_light # Your light for button 1

Any tips on how to do this?


So I immediately did more digging and foudn that changing the symbol numbers does indeed change the icons.
So follow up questoin… how do I know what symbols the symbol numbers refer to?

notes my own

  - platform: homeassistant
    id: hall_light
    entity_id: light.hall_light
        - wait_until:
            switch.is_on: nextion_init
        - lambda: |-
            int symbol = 23; #on symbol
            if (id(hall_light).state == "off") {
              symbol=22; #off symbol
            id(disp1).send_command_printf("Lights.light0.pic=%i", symbol);

Look at the images in the hmi file.
They are numbered, and the number is the symbol.

Sorry… I’m probably being stupid, but where is this HMI file you speak of? I can’t see it in the repo

Could anyone share some screenshots of Marc’s HMI file, so I could see which symbols correspond to which number? Nextion editor is windows only so I can’t open the file to see which symbols are included…

If you don’t have a windows computer then Nextion is probably not the correct screen for you.
If you can’t replace the images then it’s not going to be “your” screen.
But I can’t help with your question, I don’t have the HMI file anymore and it’s rather daunting to screenshot the images since you can only fit two images on the screen at the same time if I recall correctly.

Here are the ID for lights

1 Like

Amazing thanks!