Template: identify HA instance

Hi All,

is there some build in sensor / variable etc. to uniquely identify the HA instance in template?
I am using the same templates on multiple HA instances and they sometimes just slightly differentiate - so would be great to have a value based on which I can identify which instance the template is running on.

I already though about something like the zone.home, but there might be some better value.
Any ideas?

EDIT: I am planning to use the same way of identificaiton for some lovelace card with the conditional card which is the reason I would not go for BluePrints in my case :slight_smile:

The simplest solution would be to change the template in each instance to include a string identifying the instance, rather than having the same template in each instance.

hm…okay…

As said it is for multiple templates and I would like to use it with the conditional card, so I changing the template / the lovelace configuraiton on every instance is a lot of work.

At the moment I am going with a simple template sensor & fixed value which I create on all instances:

template:
  - sensor:
      - name: "HA Instance ID"
        state: "MyInstance1"

VS:

template:
  - sensor:
      - name: "HA Instance ID"
        state: "MyInstance2"

Just thought something like this would exist as a default sensor / value somwhere within HA…

I am struggling with the same, using containers for main + dev + upgrade
Use case: for the non-main ones, I donot want to have the automations running and I have a script that can turn them off.
My current solution is to have a command line running “cat /etc/hostname”, this works fine for me only(!) because my dev and upgrade containers are not on ‘host’ network and thus this produces different feedback…so this is not fullproof, but good enough for me