SmartHomeShop Docs

Energy Prices and Source Mapping

SmartHomeShop Energy combines account prices with entities already present in Home Assistant. Device monitoring remains local; connecting the account is an explicit, optional step.

Connect Dynamic Prices

  1. In the SmartHomeShop App, create a personal API token under Settings > API Tokens. This works on every plan, including Free.
  2. Open the SmartHomeShop.io panel in Home Assistant and go to Energy.
  3. Choose Enable Smart Energy if the page says that Smart Energy is disabled. This happens when your first SmartHomeShop product was not a P1MeterKit or WaterP1MeterKit, also after you add one later.
  4. Follow the setup wizard, or open Settings > Connection.
  5. Paste the API token and choose Connect.
  6. Keep Active contract (automatic), select a location to follow its active energy contract, or pin a specific contract.

Note: A contract linked to a location in the App applies to that location. A location without its own contract uses the contract set to All locations.

Fixed and variable contracts also work and drive the cost sensors. They have no price curve, so cheapest-hour automations, deadline schedules, the battery planner and Smart Savings need a dynamic contract.

The token is stored in Home Assistant and sent as a bearer token to the configured SmartHomeShop API. Use a dedicated token and revoke it from the App if the Home Assistant installation is retired.

Contract Information

The authenticated price response can include the active energy contract. The integration can use this to show:

  • the user-defined contract name, readable provider and location name;
  • dynamic, variable or fixed contract type;
  • start and optional end date;
  • optional monthly standing charge;
  • optional import and feed-in mark-ups per kWh.

These fields are descriptive account metadata. The customer or contract reference stored in the App is deliberately excluded from every Energy API response. At least one applicable contract is required. When no active contract applies, the Energy API returns energy_contract_required without electricity, gas or summary prices; add or activate a contract in the App before reloading the integration.

The contracts endpoint lists every account location with its current active_contract. This allows Home Assistant to distinguish contracts for Home, Office or another user-defined location without guessing from contract dates.

Price Entities

The integration can expose:

  • electricity consumer, market and feed-in prices;
  • gas price;
  • average, low and high price levels;
  • current rank and daily spread;
  • the binary sensor Cheap electricity now, on at or below the average of today, and the number of negative-price hours today;
  • the next lower-price time;
  • cheapest continuous blocks from one to six hours;
  • confirmed and predicted price horizons.

Predicted hours are estimates and should be handled more conservatively than confirmed market prices.

Map Energy Sources

In Energy > Settings > Sources, select existing Home Assistant entities for the values available in your installation:

  • solar production power;
  • signed battery power, positive while discharging and negative while charging;
  • battery state of charge;
  • usable battery capacity, from a sensor or as a fixed value;
  • the solar forecast for the rest of today in kWh.

Use entities with the expected device class and unit. Battery power must be one signed sensor: separate charge and discharge sensors cannot be mapped. Use Reverse the sign when charging shows the wrong way. Your P1 meter covers the grid; select it under Settings > Connection if you have more than one.

Solar-export controls use Net grid power (CC) of the selected P1 meter, where import is positive and export is negative. Also check whether the inverter exposes a writable active-power or output-limit number. This is safer and more precise than fully stopping the inverter.

See Automations and deadline schedules for zero-export and negative-price control, settings, recovery behaviour and safety restrictions.

Home Assistant Energy Dashboard

Under Energy > Settings > HA Energy, or on the Overview of a P1 device, the integration can fill the native Energy dashboard with one click. It adds grid import and return, live grid power, gas and water from the selected meter, plus your contract prices when they are connected. Choose Set up in HA Energy. Solar, battery and individual device sources stay untouched, and if another meter is already configured you review the change first.

Solar Forecast Options

You can select an existing Home Assistant forecast entity, such as a locally configured Forecast.Solar or Solcast sensor. The SmartHomeShop App can also provide a normalised forecast endpoint on Pro and Business, but every App user must supply their own Forecast.Solar API key. The integration does not fetch that endpoint itself: under Sources you always select a Home Assistant sensor.