Sensors

Along with providing location services, the companion app also adds several additional sensors to Home Assistant. It is important to know that these sensors are only updated when a location is pushed to Home Assistant or the web view is refreshed. If you don't want the device_tracker entity but still want sensors to update then just disable the entity in the entity registry to stop location updates and keep sensor updates.

The sensors provided by the companion app are:

iOS iOS Sensor List

SensorAttributesDescription
sensor.activityconfidence, typesThe current activity type as computed by iOS. Requires motion permissions to be enabled.
sensor.average_active_paceNoneThe averaged pace calculated by iOS from pedometer data. Units: meters per second, m/s
sensor.battery_levelBattery State, Low Power ModeThe current battery level of the device. Current battery state is available from the Battery State attribute of this sensor.
sensor.battery_stateBattery Level, Low Power ModeThe current charging state (either Charging, Not Charging, or Full) of the device. Current battery level is available from the Level attribute of this sensor.
sensor.bssidNoneThe MAC address of the wireless access point your phone is connected to. When off Wi-Fi, this sensor will report Not Connected.
sensor.connection_typeCellular TechnologyThe current data connection being used by the phone.
sensor.distanceNoneThe estimated distance walked by the user since midnight local time. Units: meters, m
sensor.floors_ascendedNoneThe approximate number of floors ascended by walking since midnight local time.
sensor.floors_descendedNoneThe approximate number of floors descended by walking. Since
sensor.geocoded_locationSee BelowCalculated address based on GPS data.
sensor.last_update_triggerNoneThe cause of the last update of location and sensor data from the device to Home Assistant
sensor.sim_1See BelowName of your cellular provider.
sensor.sim_2See BelowName of your cellular provider.
sensor.ssidNoneThe human-readable name of the Wi-Fi network the device is currently connected to. When off Wi-Fi, this sensor will report Not Connected.
sensor.stepsNoneThe number of steps taken by the user.
sensor.storageSee BelowThe amount of total and available storage on your iOS device.

Attributes such as Cellular Technology can be accessed with a template such as:

{{ states.sensor.connection_type.attributes['Cellular Technology'] }}

android Android Sensor List

SensorAttributesDescription
sensor.battery_levelNoneThe current battery level of the device.
sensor.battery_stateis_charging, charger_typeThe state of the sensor reflects the current state of the battery (See Below). The is_charging attribute will be either true or false. The charger_type attribute will show either ac, usb, wireless or unknown.
sensor.geocoded_locationSee BelowCalculated address based on GPS data.
sensor.wifi_connectionbssid, ip_address, link_speed, is_hidden, frequency, signal_levelThe state of the sensor will show the name of the connected network or <not connected>.

Activity Sensor

iOS sensor.activity provides the current motion activity as calculated by iOS along with the confidence of the calculations. Activities known by iOS and given by sensor.activity are:

  • Stationary
  • Walking
  • Running
  • Automotive
  • Cycling

If iOS is unable to calculate an activity from motion data, Unknown will be given.

It is possible for multiple activities to be returned, such as Cycling and Stationary (if you are cycling but at a stop light), the state of the sensor is simply the first of these return by iOS (not necessarily the most likely). A complete list of calculated activities is given by the types attribute. See this post by @Mattt over at nshipster for a description of how different scenarios yield multiple activities.

The confidence attribute corresponds how accurate iOS believes the report of the current activity is. Possible values are:

  • Low
  • Medium
  • High

Battery Sensors

iOS The Battery State sensor (sensor.battery_state) provides information on the current status of the devices battery. The three possible values are Charging, Not Charging, or Full when the device is 100 % charged. The Battery Level sensor (sensor.battery_level) reports the current battery level of the device from 0–100 %. The charge level is reflected in the sensor icon. Additionally there is a "Low Power Mode" attribute that reports true or false depending on whether your iOS device is in Low Power Mode or not.

android The Battery State sensor (sensor.battery_state) provides information on the current status of the devices battery. The five possible states are full, charging, discharging, not_charging or unknown. The attribute is_charging can be used to determine if the device is currently charging, the attribute charger_type can report the type of charger being used. Possible values are ac, usb, wireless and unknown. The sensor icon reflects the charging status, and type of charging being used.

Connection Type Sensor

iOS The following connection types are known by the companion app:

  • Wi-Fi
  • Cellular
  • No Connection

A more specific description of the data connection can be found in the Cellular Technology attribute of the sensor (which only appears when on cellular). Possible values for this attribute are:

  • 4G
  • 3G
  • 2G
  • Cellular
  • No Connection

If the connection type is not recognized, either Unknown or Unknown Technology will be returned.

android Android users will have a wifi_connection sensor where the state will reflect the currently connected network name or <not connected>. The sensor will also have attributes about the connection itself, see the table above for the different attributes.

Last Update Trigger Sensor

iOS This sensor displays exactly what caused the last update of location and sensor data from the device to Home Assistant.

StateDescription
ManualA manual update is triggered when the user pulls to refresh.
LaunchSensors are updated upon initial app launch.
PeriodicUpdates periodically according to your settings in App Configuration -> Sensors.
Significant Location ChangeTriggers when there has been a significant change in the device’s location, such as 500 meters or more. See location for additional details.
Geographic Region EnteredTriggered when entering any user-specified Home Assistant zone (also known as geofencing).
Geographic Region ExitedTriggered when exiting any user-specified Home Assistant zone (also known as geofencing).
Push NotificationRequesting location updates via push notification.
Background FetchWhen the app refreshes sensor information in the background.
SiriLocation updates triggered via the Siri Shortcuts "Send Location" shortcut.
iBeacon Region EnteredTriggered when an iBeacon is seen that corresponds to a known zone.
RegistrationTriggered once when the app is first connected to your Home Assistant instance.

Geocoded Location Sensor

The geocoded location sensor provides a user-friendly description of a users current location coordinates, often containing the name of the place, its address, and other relevant information. This sensor reports many detailed attributes allowing you to create useful template sensors.

Geocoding is handled directly by iOS's MapKit and Core Location services. In Android geocoding is handled by the internal Geocoder.

AttributeDescription
LocationThe latitude and longitude coordinates of the placemark.
NameThe name of the placemark. iOS iOS only, for Android check the state of the sensor.
CountryThe name of the country associated with the placemark.
ISOCountryCodeThe abbreviated country name.
TimeZoneThe time zone associated with the placemark. iOS iOS only
AdministrativeAreaThe state or province associated with the placemark.
SubAdministrativeAreaAdditional administrative area information for the placemark.
PostalCodeThe postal code associated with the placemark.
LocalityThe city associated with the placemark.
SubLocalityAdditional city-level information for the placemark.
ThoroughfareThe street address associated with the placemark.
SubThoroughfareAdditional street-level information for the placemark.
AreasOfInterestThe relevant areas of interest associated with the placemark. iOS iOS only
OceanThe name of the ocean associated with the placemark. iOS iOS only
InlandWaterThe name of the inland water body associated with the placemark. iOS iOS only

Pedometer Sensors

iOS The pedometer sensors provide step-counting data from the devices built-in motion processor. They keep a tally of your daily on-foot activity, and reset at midnight. These sensors require motion permissions to be enabled.

SensorDescription
sensor.stepsThe number of steps taken by the user.
sensor.distanceThe estimated distance (in meters) traveled by the user.
sensor.average_active_paceThe average pace of the user, measured in seconds per meter.
sensor.floors_ascendedThe approximate number of floors ascended by walking.
sensor.floors_descendedThe approximate number of floors descended by walking.

Cellular Provider Sensor

iOS The cellular provider sensor displays information about the user’s cellular service provider, such as its unique identifier and whether it allows VoIP calls on its network. sensor.sim_1 corresponds to the physical SIM card installed and sensor.sim_2 corresponds to the eSIM (this is only shown if the eSIM is enabled).

AttributeDescription
Carrier NameThe name of the user’s home cellular service provider.
Current Radio Technology
ISO Country CodeThe ISO country code for the user’s cellular service provider.
Mobile Country CodeThe mobile country code (MCC) for the user’s cellular service provider.
Mobile Network CodeThe mobile network code for the user’s cellular service provider.
Carrier ID
Allows VoIPIndicates if the carrier allows making VoIP calls on its network.

Storage Sensor

iOS This sensor displays information on the device storage. The file sizes reported are in Base-10.

AttributeDescription
AvailableThe amount of available storage remaining on your device.
Available (Important)The volume’s available capacity in bytes for storing important resources.
Available (Opportunistic)The volume’s available capacity in bytes for storing nonessential resources.
TotalThe total storage capacity of your device.