Geo Home Smart Meter integration

May I ask what you are using for your username? This is still the biggest question mark for me - I can see the API stuff would work if I can figure that out.

The email from GeoTogether was not crazy useful as the app, and assumingly the API, is made by a 3rd party company

It’s my email address.

Note that the system uses an access token which changes periodically. The access token needs to be retrieved using the username and password in one of the rest calls, and is then used in the subsequent rest calls that get the data.

Okay - so thanks to you, this post about the rest requests and this post about why my post requests weren’t working for me I have figured a few things out. Firstly - rest requests dont like special characters (which my email and password both have). This can be fixed in a few ways which I tried with this home assistant integration.

As these werent working, I edited the integration to print out my user and password if it fails to authorise with the API - aaaand it turns out it was using admin and password, the defaults for the integration. After hard coding my actual user and pass, i am starting to get somewhere I think - but will need a few days to figure out why exactly things arent running as smooth as possible.

Hopefully will fork and upload to git (and submit to HACS) if I get it working fully.

1 Like

image
I have managed to get good data from it - now just figureing out why it is not updating the home assistant sensors

Would be great to see how you managed to get the identity. I’m struggling with the username! Here is what i’ve used and the error given. (I’ve edited the email address and password, but they are based on the same principle)

C:\Windows\System32> curl -X POST -H “Content-Type: application/json” -d ‘{“identity”: “[email protected]”, “password”: “!Ttesting16”}’ https://api.geotogether.com/usersservice/v2/login
curl: (6) Could not resolve host: gmail.com,
curl: (3) URL using bad/illegal format or missing URL
curl: (3) unmatched close brace/bracket in URL position 14:
!Ttesting16}’

Ok, I installed this version https://github.com/balneaves/home-assistant-components
and managed to log in with my email address and password. All seems to be working fine, however struggling to work out what the sensor.electricity and sensor.gas are based on.
elec
Is this some kind of lifetime figure since I started using the Trio? Even looking at the actual app on the phone I can seem to understand where these figures have come from.

1 Like

all working once I replaced the 3 £s with "GBP"s. I could look into it further and see why the file doesn’t have correct utf-8 encoding but this works right now

1 Like

sorry I didn’t get a notification of your reply

I used the credentials that I sign into the GeoHome android app with. - the GeoHome account associated with the Smart Display. It’s my email address & a password

I have this too. With EDF, had smart meters installed a couple of months ago. Gas does not connect to the electricity meter so not on the IHD, but I assume that isn’t the cause. Bought the WiFi module separately and the Trio is connected to local WiFi fine. I’ve checked firewall is allowing the Trio to communicate to the outside world (it is). At a bit of a loss to get it ro connect (needed for the security code required to sign up to geohome).

Hi All. What is the data period from the geohome API?
Are you getting 10sec data or 30 mins data (or something else)?
Not sure which of these options to with with:

  • Grab a £20 wifi adaptor for my geo trio 2 IHD (just installed by EDF today) and use geohome component
  • Use the glow/bright/hildebrand DCC API (free) for 30 mins data (with last 30 mins per day getting lost, according to the hacs component authort)
  • or go with a hildebrand IHD+CAD (£70) which spits out mqtt on 10 sec interval (not sure if there is a hacs component for this anymore either…)

thanks for inputs :slight_smile:

Had a look in the code for geohome custom component in github and I can see:
update_interval=timedelta(seconds=120),

So looks like the data from geohome is updating at max every 2 mins.

I had the same issue and contacted Geo support in the end.
You need to email [email protected], explain that you bought WIFI module separately and send them a picture of the device info (under Setting in Trio), they need to allow your Trio to connect to their Cloud.

1 Like

Hi everone who has been having issues. Sorry - I was not getting any notifications about the posts here so was oblivious to it all. I’ll take a look through the issues list and see what I can do.

Martin

If you are getting an error while trying to get your username, make sure you are running the code in the HA terminal, rather than your Windows command prompt.
Also useful to remember shift + highlight to copy from the HA terminal.

FYI, the integration is now available via HACS, with fixes from various contributors (thanks all!). I am waiting for it to be added to the HACS default repositories, but for now you can add it as a custom repository at https://github.com/mmillmor/geo_home

This will fix the pound sign for you, and stop a few potential errors.

Most people seem to trip up on needing to ask customer service to enable their account for api access, so don’t forget to email e-mail [email protected] to ask them to enable your meter.

1 Like

Great news this will be on HACS

I found that there is another URL that you can pull to get more info about standing charge pricing etc which is “smets2-daily-data”.

I had a bit of a play with the original code posted here https://community.home-assistant.io/t/uk-smart-energy-meters/16545/205 around access tokens etc and set the units for a bunch of sensors as well as availability markers etc.

I have a geo_together_sensor.yaml that now looks like this:

#
# Renew Access Token
#

  - platform: rest
    name: "Geo API Access Token"
    method: POST
    payload: '{ "identity" : "[id]", "password": "[password]" }'
    resource: https://api.geotogether.com/usersservice/v2/login
    scan_interval: 3555
    value_template: >
            {% if value_json.accessToken is defined %}
                {{ "on" }}
            {% else %}
                {{ "unavailable" }}
            {% endif %}    
    json_attributes:
      - accessToken

#
# Get System ID
#

  - platform: command_line
    command: >
      curl 
      -H "Authorization: Bearer {{ state_attr('sensor.geo_api_access_token', 'accessToken') }}"
      -H "Accept: application/json" 
      -H "Content-Type: application/json"
      'https://api.geotogether.com/api/userapi/v2/user/detail-systems'
    name: Geo API Details
    unique_id: geo_api_details
    scan_interval: 3555
    value_template: >
            {% if value_json.systemRoles is defined %}
                {{ "on" }}
            {% else %}
                {{ "unavailable" }}
            {% endif %}
    json_attributes:
      - systemRoles

#
# Pull Datasets
#

  - platform: command_line
    command: >
      curl 
      -H "Authorization: Bearer {{ state_attr('sensor.geo_api_access_token', 'accessToken') }}"
      -H "Accept: application/json" 
      -H "Content-Type: application/json"
      'https://api.geotogether.com/api/userapi/system/smets2-live-data/{% if states.sensor.geo_system_id.state is defined %}{{ states.sensor.geo_system_id.state }}{% else %}{% endif %}'
    name: Geo API Live Data
    unique_id: geo_api_live
    scan_interval: 60
    value_template: >
            {% if value_json.power is defined %}
                {{ "on" }}
            {% else %}
                {{ "unavailable" }}
            {% endif %}
    json_attributes:
      - latestUtc
      - power
      - systemStatus

  - platform: command_line
    command: >
      curl 
      -H "Authorization: Bearer {{ state_attr('sensor.geo_api_access_token', 'accessToken') }}"
      -H "Accept: application/json" 
      -H "Content-Type: application/json"
      'https://api.geotogether.com/api/userapi/system/smets2-periodic-data/{% if states.sensor.geo_system_id.state is defined %}{{ states.sensor.geo_system_id.state }}{% else %}{% endif %}'
    name: Geo API Periodic Data
    unique_id: geo_api_periodic
    scan_interval: 600
    value_template: >
            {% if value_json.totalConsumptionList is defined %}
                {{ "on" }}
            {% else %}
                {{ "unavailable" }}
            {% endif %}
    json_attributes:
      - latestUtc
      - totalConsumptionList
      - billToDateList
      - activeTariffList
      - currentCostsElec
      - currentCostsGas

  - platform: command_line
    command: >
      curl 
      -H "Authorization: Bearer {{ state_attr('sensor.geo_api_access_token', 'accessToken') }}"
      -H "Accept: application/json" 
      -H "Content-Type: application/json"
      'https://api.geotogether.com/api/userapi/system/smets2-daily-data/{% if states.sensor.geo_system_id.state is defined %}{{ states.sensor.geo_system_id.state }}{% else %}{% endif %}'
    name: Geo API Daily Data
    unique_id: geo_api_daily
    scan_interval: 3555
    value_template: >
            {% if value_json.standingChargeList is defined %}
                {{ "on" }}
            {% else %}
                {{ "unavailable" }}
            {% endif %}
    json_attributes:
      - latestUtc
      - standingChargeList



Then I have a geo_together_template.yaml file that looks like this:

    - sensor:
#
# Detail Sensors - System ID
#
    
      - unique_id: geo_system_id
        name: 'Geo System ID'
        state: >
            {{ 
                state_attr('sensor.geo_api_details','systemRoles') | 
                map(attribute='systemId') | 
                first 
            }}
        availability: >
            {{ states.sensor.geo_api_details.state }}
        

#
# Daily Sensors - Standing Charge
#
      - unique_id: geo_electricity_standing_charge
        name: 'Geo Electricity Standing Charge'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_daily_data','standingChargeList') | 
                        selectattr('commodityType', 'equalto', 'ELECTRICITY') | 
                        map(attribute='standingCharge') | 
                        first /100
                    ) | 
                    round(5)   
                }}
        availability: >
            {{ 
                states.sensor.geo_api_daily_data.state and
                (
                        state_attr('sensor.geo_api_daily_data','standingChargeList') | 
                        selectattr('commodityType', 'equalto', 'ELECTRICITY') | 
                        map(attribute='valueAvailable') | 
                        first 
                ) == true
            }}
        device_class: monetary
        unit_of_measurement: "GBP"

      - unique_id: geo_gas_standing_charge
        name: 'Geo Gas Standing Charge'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_daily_data','standingChargeList') | 
                        selectattr('commodityType', 'equalto', 'GAS_ENERGY') | 
                        map(attribute='standingCharge') | 
                        first /100
                    ) | 
                    round(5)   
                }}
        availability: >
            {{ 
                states.sensor.geo_api_daily_data.state and
                (
                        state_attr('sensor.geo_api_daily_data','standingChargeList') | 
                        selectattr('commodityType', 'equalto', 'GAS_ENERGY') | 
                        map(attribute='valueAvailable') | 
                        first 
                ) == true
            }}
        device_class: monetary
        unit_of_measurement: "GBP"


#
# Periodic Sensors - Total Usage
#

      - unique_id: geo_gas_total_consumption_m3
        name: 'Geo Gas Total Consumption m³'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_periodic_data','totalConsumptionList') | 
                        selectattr('commodityType', 'equalto', 'GAS_ENERGY') | 
                        map(attribute='totalConsumption') | 
                        first/1000 
                    ) |
                    round(3)
                }}
        availability: >
            {{ 
                states.sensor.geo_api_periodic_data.state and
                (
                        state_attr('sensor.geo_api_periodic_data','totalConsumptionList') | 
                        selectattr('commodityType', 'equalto', 'GAS_ENERGY') | 
                        map(attribute='valueAvailable') | 
                        first 
                ) == true
            }}
        unit_of_measurement: "m³"
        device_class: gas
        state_class: total_increasing
        attributes:
          last_reset: '1970-01-01T00:00:00+00:00'
          
      - unique_id: geo_gas_total_consumption_kwh
        name: 'Geo Gas Total Consumption kWh'
        state: >
                {{
                    (
                        state_attr('sensor.geo_api_periodic_data','totalConsumptionList') | 
                        selectattr('commodityType', 'equalto', 'GAS_ENERGY') | 
                        map(attribute='totalConsumption') | 
                        first/1000*1.02264*39.2/3.6
                    ) | 
                    round(3)
                }}
        availability: >
            {{ 
                states.sensor.geo_api_periodic_data.state and
                (
                        state_attr('sensor.geo_api_periodic_data','totalConsumptionList') | 
                        selectattr('commodityType', 'equalto', 'GAS_ENERGY') | 
                        map(attribute='valueAvailable') | 
                        first 
                ) == true
            }}
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing
        attributes:
          last_reset: '1970-01-01T00:00:00+00:00'
         
      - unique_id: geo_electricity_total_consumption_kwh
        name: 'Geo Electricity Total Consumption kWh'
        state: >
                {{
                    (
                        state_attr('sensor.geo_api_periodic_data','totalConsumptionList') |
                        selectattr('commodityType', 'equalto', 'ELECTRICITY') |
                        map(attribute='totalConsumption') |
                        first 
                    ) |
                    round(3)
                }}
        availability: >
            {{ 
                states.sensor.geo_api_periodic_data.state and
                (
                        state_attr('sensor.geo_api_periodic_data','totalConsumptionList') | 
                        selectattr('commodityType', 'equalto', 'ELECTRICITY') | 
                        map(attribute='valueAvailable') | 
                        first 
                ) == true
            }}
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing        
        attributes:
            last_reset: '1970-01-01T00:00:00+00:00'
#
# Periodic Sensors - Bill to Date
#
      - unique_id: geo_electricity_bill_to_date
        name: 'Geo Electricity Bill To Date'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_periodic_data','billToDateList') | 
                        selectattr('commodityType', 'equalto', 'ELECTRICITY') | 
                        map(attribute='billToDate') | 
                        first /100
                    ) | 
                    round(2)   
                }}
        availability: >
            {{ 
                states.sensor.geo_api_periodic_data.state and
                (
                        state_attr('sensor.geo_api_periodic_data','billToDateList') | 
                        selectattr('commodityType', 'equalto', 'ELECTRICITY') | 
                        map(attribute='valueAvailable') | 
                        first 
                ) == true
            }}
        device_class: monetary
        unit_of_measurement: "GBP"

      - unique_id: geo_gas_bill_to_date
        name: 'Geo Gas Bill To Date'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_periodic_data','billToDateList') | 
                        selectattr('commodityType', 'equalto', 'GAS_ENERGY') | 
                        map(attribute='billToDate') | 
                        first /100
                    ) | 
                    round(2)
                }}
        availability: >
            {{ 
                states.sensor.geo_api_periodic_data.state and
                (
                        state_attr('sensor.geo_api_periodic_data','billToDateList') | 
                        selectattr('commodityType', 'equalto', 'GAS_ENERGY') | 
                        map(attribute='valueAvailable') | 
                        first 
                ) == true
            }}
        device_class: monetary
        unit_of_measurement: "GBP"

          
#
# Periodic Sensors - Tarrif
#
      - unique_id: geo_electricity_current_unit_price
        name: 'Geo Electricity Current Unit Price'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_periodic_data','activeTariffList') | 
                        selectattr('commodityType', 'equalto', 'ELECTRICITY') | 
                        map(attribute='activeTariffPrice') | 
                        first /100 
                    ) |
                    round(5)
                }}
        availability: >
            {{ 
                states.sensor.geo_api_periodic_data.state and
                (
                        state_attr('sensor.geo_api_periodic_data','activeTariffList') | 
                        selectattr('commodityType', 'equalto', 'ELECTRICITY') | 
                        map(attribute='valueAvailable') | 
                        first 
                ) == true
            }}
        device_class: monetary
        unit_of_measurement: "GBP"
        
      - unique_id: geo_gas_current_unit_price
        name: 'Geo Gas Current Unit Price'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_periodic_data','activeTariffList') | 
                        selectattr('commodityType', 'equalto', 'GAS_ENERGY') | 
                        map(attribute='activeTariffPrice') | 
                        first /100 
                    ) |
                    round(5)
                }}
        availability: >
            {{ 
                states.sensor.geo_api_periodic_data.state and
                (
                        state_attr('sensor.geo_api_periodic_data','activeTariffList') | 
                        selectattr('commodityType', 'equalto', 'GAS_ENERGY') | 
                        map(attribute='valueAvailable') | 
                        first 
                ) == true
            }}
        device_class: monetary
        unit_of_measurement: "GBP"
        
#
# Periodic Sensors - Electricity Cost History
#
      - unique_id: geo_electricity_cost_today
        name: 'Geo Electricity Cost Today'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_periodic_data','currentCostsElec') | 
                        selectattr('duration', 'equalto', 'DAY') | 
                        map(attribute='costAmount') | 
                        first /100 
                    ) |
                    round(2)
                }}
        availability: >
            {{ states.sensor.geo_api_periodic_data.state }}
        device_class: monetary
        unit_of_measurement: "GBP"
        
      - unique_id: geo_electricity_cost_this_week
        name: 'Geo Electricity Cost This Week'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_periodic_data','currentCostsElec') | 
                        selectattr('duration', 'equalto', 'WEEK') | 
                        map(attribute='costAmount') | 
                        first /100 
                    ) |
                    round(2)
                }}
        availability: >
            {{ states.sensor.geo_api_periodic_data.state }}
        device_class: monetary
        unit_of_measurement: "GBP"
        
      - unique_id: geo_electricity_cost_this_month
        name: 'Geo Electricity Cost This Month'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_periodic_data','currentCostsElec') | 
                        selectattr('duration', 'equalto', 'MONTH') | 
                        map(attribute='costAmount') | 
                        first /100 
                    ) |
                    round(2)
                }}
        availability: >
            {{ states.sensor.geo_api_periodic_data.state }}
        device_class: monetary
        unit_of_measurement: "GBP"
        
#
# Periodic Sensors - Electricity Consumption History
#
      - unique_id: geo_electricity_kwh_today
        name: 'Geo Electricity kWh Today'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_periodic_data','currentCostsElec') | 
                        selectattr('duration', 'equalto', 'DAY') | 
                        map(attribute='energyAmount') | 
                        first 
                    ) |
                    round(3)
                }}
        availability: >
            {{ states.sensor.geo_api_periodic_data.state }}
        device_class: energy
        unit_of_measurement: "kWh"
        
      - unique_id: geo_electricity_kwh_this_week
        name: 'Geo Electricity kWh This Week'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_periodic_data','currentCostsElec') | 
                        selectattr('duration', 'equalto', 'WEEK') | 
                        map(attribute='energyAmount') | 
                        first 
                    ) |
                    round(3)
                }}
        availability: >
            {{ states.sensor.geo_api_periodic_data.state }}
        device_class: energy
        unit_of_measurement: "kWh"
        
      - unique_id: geo_electricity_kwh_this_month
        name: 'Geo Electricity kWh This Month'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_periodic_data','currentCostsElec') | 
                        selectattr('duration', 'equalto', 'MONTH') | 
                        map(attribute='energyAmount') | 
                        first 
                    ) |
                    round(3)
                }}
        availability: >
            {{ states.sensor.geo_api_periodic_data.state }}
        device_class: energy
        unit_of_measurement: "kWh"
        
#
# Periodic Sensors - Gas Cost History
#
      - unique_id: geo_gas_cost_today
        name: 'Geo Gas Cost Today'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_periodic_data','currentCostsGas') | 
                        selectattr('duration', 'equalto', 'DAY') | 
                        map(attribute='costAmount') | 
                        first /100 
                    ) |
                    round(2)
                }}
        availability: >
            {{ states.sensor.geo_api_periodic_data.state }}
        device_class: monetary
        unit_of_measurement: "GBP"
        
      - unique_id: geo_gas_cost_this_week
        name: 'Geo Gas Cost This Week'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_periodic_data','currentCostsGas') | 
                        selectattr('duration', 'equalto', 'WEEK') | 
                        map(attribute='costAmount') | 
                        first /100 
                    ) |
                    round(2)
                }}
        availability: >
            {{ states.sensor.geo_api_periodic_data.state }}
        device_class: monetary
        unit_of_measurement: "GBP"
        
      - unique_id: geo_gas_cost_this_month
        name: 'Geo Gas Cost This Month'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_periodic_data','currentCostsGas') | 
                        selectattr('duration', 'equalto', 'MONTH') | 
                        map(attribute='costAmount') | 
                        first /100 
                    ) |
                    round(2)
                }}
        availability: >
            {{ states.sensor.geo_api_periodic_data.state }}
        device_class: monetary
        unit_of_measurement: "GBP"
        
#
# Periodic Sensors - Gas Consumption History
#
      - unique_id: geo_gas_kwh_today
        name: 'Geo Gas kWh Today'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_periodic_data','currentCostsGas') | 
                        selectattr('duration', 'equalto', 'DAY') | 
                        map(attribute='energyAmount') | 
                        first 
                    ) |
                    round(3)
                }}
        availability: >
            {{ states.sensor.geo_api_periodic_data.state }}
        device_class: energy
        unit_of_measurement: "kWh"
        
      - unique_id: geo_gas_kwh_this_week
        name: 'Geo Gas kWh This Week'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_periodic_data','currentCostsGas') | 
                        selectattr('duration', 'equalto', 'WEEK') | 
                        map(attribute='energyAmount') | 
                        first 
                    ) |
                    round(3)
                }}
        availability: >
            {{ states.sensor.geo_api_periodic_data.state }}
        device_class: energy
        unit_of_measurement: "kWh"
        
      - unique_id: geo_gas_kwh_this_month
        name: 'Geo Gas kWh This Month'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_periodic_data','currentCostsGas') | 
                        selectattr('duration', 'equalto', 'MONTH') | 
                        map(attribute='energyAmount') | 
                        first 
                    ) |
                    round(3)
                }}
        availability: >
            {{ states.sensor.geo_api_periodic_data.state }}
        device_class: energy
        unit_of_measurement: "kWh"
        
          
#
# Live Sensors - Current Usage
#
      - unique_id: geo_electricity_current_usage
        name: 'Geo Electricity Current Usage'
        state: >
                {{
                    (
                        state_attr('sensor.geo_api_live_data','power') | 
                        selectattr('type', 'equalto', 'ELECTRICITY') | 
                        map(attribute='watts') | 
                        first 
                    ) |
                    round(0)
                }}
        availability: >
            {{ 
                states.sensor.geo_api_live_data.state and
                (
                    state_attr('sensor.geo_api_live_data','power') | 
                    selectattr('type', 'equalto', 'ELECTRICITY') | 
                    map(attribute='valueAvailable') | 
                    first 
                ) == true
            }}
        device_class: energy
        unit_of_measurement: "W"
        
      - unique_id: geo_gas_current_usage
        name: 'Geo Gas Current Usage'
        state: >
                {{ 
                    (
                        state_attr('sensor.geo_api_live_data','power') |
                        selectattr('type', 'equalto', 'GAS_ENERGY') |
                        map(attribute='watts') | 
                        first /1000 
                    ) |
                    round(3)
                }}
        availability: >
            {{ 
                states.sensor.geo_api_live_data.state and
                (
                    state_attr('sensor.geo_api_live_data','power') | 
                    selectattr('type', 'equalto', 'GAS_ENERGY') | 
                    map(attribute='valueAvailable') | 
                    first 
                ) == true
            }}
        device_class: gas
        unit_of_measurement: "kW"
        
#
# Live Sensors - System Status
#
      - unique_id: geo_system_status_display
        name: 'Geo System Status Display'
        state: >
                {% 
                    set display = (state_attr('sensor.geo_api_live_data','systemStatus') | 
                    selectattr('component', 'equalto', 'DISPLAY') | 
                    map(attribute='statusType') | 
                    first)
                %}
                {% 
                    set display_error_code = (state_attr('sensor.geo_api_live_data','systemStatus') | 
                    selectattr('component', 'equalto', 'DISPLAY') | 
                    map(attribute='systemErrorCode') | 
                    first)
                %}
                {% if display is defined %}       
                    {{ display }} - {{ display_error_code }}
                {% else %}
                    {{ 'ASSUMED_OK' }}
                {% endif %}        
        availability: >
            {{ states.sensor.geo_api_live_data.state }}

      - unique_id: geo_system_status_zigbee
        name: 'Geo System Status Zigbee'
        state: >
                {% 
                    set zigbee = (state_attr('sensor.geo_api_live_data','systemStatus') | 
                    selectattr('component', 'equalto', 'ZIGBEE') | 
                    map(attribute='statusType') | 
                    first)
                %}
                {% 
                    set zigbee_error_code = (state_attr('sensor.geo_api_live_data','systemStatus') | 
                    selectattr('component', 'equalto', 'ZIGBEE') | 
                    map(attribute='systemErrorCode') | 
                    first)
                %}
                {% if zigbee is defined %}       
                    {{ zigbee }} - {{ zigbee_error_code }}
                {% else %}
                    {{ 'ASSUMED_OK' }}
                {% endif %}        
        availability: >
            {{ states.sensor.geo_api_live_data.state }}

      - unique_id: geo_system_status_electricity
        name: 'Geo System Status Electricity'
        state: >
                {% 
                    set electricity = (state_attr('sensor.geo_api_live_data','systemStatus') | 
                    selectattr('component', 'equalto', 'ELECTRICITY') | 
                    map(attribute='statusType') | 
                    first)
                %}
                {% 
                    set electricity_error_code = (state_attr('sensor.geo_api_live_data','systemStatus') | 
                    selectattr('component', 'equalto', 'ELECTRICITY') | 
                    map(attribute='systemErrorCode') | 
                    first)
                %}
                {% if electricity is defined %}       
                    {{ electricity }} - {{ electricity_error_code }}
                {% else %}
                    {{ 'ASSUMED_OK' }}
                {% endif %}        
        availability: >
            {{ states.sensor.geo_api_live_data.state }}

      - unique_id: geo_system_status_gas
        name: 'Geo System Status Gas'
        state: >
                {% 
                    set gas = (state_attr('sensor.geo_api_live_data','systemStatus') | 
                    selectattr('component', 'equalto', 'GAS') | 
                    map(attribute='statusType') | 
                    first)
                %}
                {% 
                    set gas_error_code = (state_attr('sensor.geo_api_live_data','systemStatus') | 
                    selectattr('component', 'equalto', 'GAS') | 
                    map(attribute='systemErrorCode') | 
                    first)
                %}
                {% if gas is defined %}       
                    {{ gas }} - {{ gas_error_code }}
                {% else %}
                    {{ 'ASSUMED_OK' }}
                {% endif %}
        availability: >
            {{ states.sensor.geo_api_live_data.state }}

      - unique_id: geo_system_status_wifi
        name: 'Geo System Status WiFi'
        state: >
                {% 
                    set wifi = (state_attr('sensor.geo_api_live_data','systemStatus') | 
                    selectattr('component', 'equalto', 'WIFI') | 
                    map(attribute='statusType') | 
                    first)
                %}
                {% 
                    set wifi_error_code = (state_attr('sensor.geo_api_live_data','systemStatus') | 
                    selectattr('component', 'equalto', 'WIFI') | 
                    map(attribute='systemErrorCode') | 
                    first)
                %}
                {% if wifi is defined %}       
                    {{ wifi }} - {{ wifi_error_code }}
                {% else %}
                    {{ 'ASSUMED_OK' }}
                {% endif %}
        availability: >
            {{ states.sensor.geo_api_live_data.state }}

        

The two files are placed in the respective configuration.sensor.enabled and configuration.template.enabled directories and are loaded with the following lines added to configuration.yaml:

sensor: !include_dir_merge_list configuration.sensor.enabled/

template: !include_dir_merge_list configuration.template.enabled/

@mmillmor could you add the sensors etc to your HACS integration?

The above gives me the following Electricity related entities:

Gas related entities:

Geo status entities:

Hi

Could you help me with adding these files to HA. Where do I add them please as I can’t find any

configuration.sensor.enabled and configuration.template.enabled directories

Many Thanks

Thanks for the suggestions @Keyman3. I have updated the integration to add those values.

@miniwilliams, you should use HACS to install the integration - that way you will stay updated with fixes and so on.

A note for everyone who is an existing user - I corrected the way I was recording money to use “GBP” instead of “£”. Your “statistics_meta” table will have the wrong values in it for unit_of_measurement and it. You should edit the database to change the value to GBP using the SQLite Web add-in if you want to preserve historic data

@mmillmor I have just removed my old stuff and updated to your HACS version. Any chance you could add the Gas m3 usage and wifi / zigbee status items too?