# PowerSource

# PowerSource


```
@Generated(value = ["GoogleHomePlatformCodegen"])
interface PowerSource : PowerSourceTrait.Attributes, MatterTrait
```

<br />

*** ** * ** ***

API for the PowerSource trait. This trait provides an interface to devices that provide power to other devices.

## Summary

| ### Nested types |
|---|
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSource.Attribute : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this trait's attributes. |
| `class https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSource.BatChargeFaultChangeEvent : https://developers.home.google.com/reference/kotlin/com/google/home/Event, https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.BatChargeFaultChange` |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSource.BatChargeFaultChangeEvent.EventFields : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this event's fields. |
| `class https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSource.BatFaultChangeEvent : https://developers.home.google.com/reference/kotlin/com/google/home/Event, https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.BatFaultChange` |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSource.BatFaultChangeEvent.EventFields : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this event's fields. |
| `class https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSource.WiredFaultChangeEvent : https://developers.home.google.com/reference/kotlin/com/google/home/Event, https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.WiredFaultChange` |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSource.WiredFaultChangeEvent.EventFields : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this event's fields. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSource#supports(com.google.home.matter.standard.PowerSource.Attribute)(attribute: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSource.Attribute)` |

| ### Public properties |
|---|---|
| `open https://developers.home.google.com/reference/kotlin/com/google/home/TraitFactory<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSource>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSource#factory()` |

| ### Inherited functions |
|---|
| From [com.google.home.matter.standard.PowerSourceTrait.Attributes](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes) |---|---| | `open https://developers.home.google.com/reference/kotlin/com/google/home/StructDescriptor` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#getDescriptor()()` Returns the descriptor for the struct. | | `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#getFieldValueById(kotlin.UInt)(tagId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html)` Returns the value of the field for the given tag ID. | |
| From [com.google.home.TraitStateInvalidation](https://developers.home.google.com/reference/kotlin/com/google/home/TraitStateInvalidation) |---|---| | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/TraitStateInvalidation#forceRead()()` | |

| ### Inherited properties |
|---|
| From [com.google.home.matter.standard.PowerSourceTrait.Attributes](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes) |---|---| | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#acceptedCommandList()` A list of client-generated commands which are supported by this cluster server instance. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.BatChargeFaultEnum>?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#activeBatChargeFaults()` Indicates the set of battery charge faults currently detected by the device on this power source. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.BatFaultEnum>?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#activeBatFaults()` Indicates the set of battery faults currently detected by the device on this power source. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.WiredFaultEnum>?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#activeWiredFaults()` The set of wired faults currently detected by the device on this power source. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#attributeList()` A list of the attribute IDs of the attributes supported by the cluster instance. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batAnsiDesignation()` The string representing the ANSI designation for the battery, as specified in ANSI C18. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.BatApprovedChemistryEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batApprovedChemistry()` ID of the preferred chemistry of the battery source, as specified in `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.BatApprovedChemistryEnum`. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batCapacity()` The preferred minimum charge capacity rating in milliampere-hours of battery cells or packs in the battery source. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.BatChargeLevelEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batChargeLevel()` The ranking of the charge level of the battery used to indicate when intervention is required, as specified in `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.BatChargeLevelEnum`. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.BatChargeStateEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batChargeState()` The state of the battery charge, as specified in `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.BatChargeStateEnum`. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batChargingCurrent()` The assessed current in milliamps being supplied to charge the battery source. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.BatCommonDesignationEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batCommonDesignation()` The ID of the common or colloquial designation of the battery, as specified in `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.BatCommonDesignationEnum`. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batFunctionalWhileCharging()` Indicates whether the device can remain operational while the battery source is charging. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batIecDesignation()` The string representing the IEC designation for the battery, as specified in IEC 60086. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batPercentRemaining()` The estimated percentage of battery charge remaining until the battery can no longer provide power to the device. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batPresent()` Indicates if the device detects that the batteries are properly installed. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batQuantity()` The number of battery cells or packs in the battery source. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.BatReplaceabilityEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batReplaceability()` Indicates the replaceability of the battery as specified in `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.BatReplaceabilityEnum`. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batReplacementDescription()` A user-facing description of this battery, containing information required to identify a replacement, such as form factor, chemistry, or preferred manufacturer. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batReplacementNeeded()` Indicates if the battery needs to be replaced. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batTimeRemaining()` The estimated time in seconds before the battery will no longer be able to provide power to the device. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batTimeToFullCharge()` The estimated time in seconds before the battery source is fully charged. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#batVoltage()` The currently measured output voltage of the battery in millivolts. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#clusterRevision()` The revision of the server cluster specification supported by the cluster instance. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#description()` A user-facing description of the source, used to distinguish it from other power sources. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html>?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#endpointList()` A list of endpoints that are powered by the source defined by this cluster. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Feature` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#featureMap()` Whether the server supports zero or more optional cluster features. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#generatedCommandList()` A list of server-generated commands (server to client) which are supported by this cluster server instance. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#order()` The relative preference with which the device selects the source to provide power. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.PowerSourceStatusEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#status()` The participation of the power source in providing power to the node, as specified in `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.PowerSourceStatusEnum`. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#wiredAssessedCurrent()` The assessed instantaneous current draw of the device on the hard-wired source, in milliamps. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#wiredAssessedInputFrequency()` The assessed frequency of the voltage, currently provided by the hard-wired source, in Hz. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#wiredAssessedInputVoltage()` The assessed RMS or DC voltage currently provided by the hard-wired source, in millivolts. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.WiredCurrentTypeEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#wiredCurrentType()` The type of current that the device expects to be provided by the hard-wired source, as specified in `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.WiredCurrentTypeEnum`. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#wiredMaximumCurrent()` The maximum current in milliamps, given in the device's regulatory compliance label, expected to be provided by the hard-wired source. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#wiredNominalVoltage()` The nominal voltage in millivolts, given in the device's regulatory compliance label, expected to be provided by the hard-wired source. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/PowerSourceTrait.Attributes#wiredPresent()` Indicates if the device detects that the hard-wired power source is properly connected. | |
| From [com.google.home.Trait](https://developers.home.google.com/reference/kotlin/com/google/home/Trait) |---|---| | `https://developers.home.google.com/reference/kotlin/com/google/home/Trait.TraitMetadata` | `https://developers.home.google.com/reference/kotlin/com/google/home/Trait#metadata()` | |

## Public functions

### supports

```
fun supports(attribute: PowerSource.Attribute): Boolean
```

## Public properties

### factory

```
open val factory: TraitFactory<PowerSource>
```