-**mos_temperature** (*Optional*): Temperature of the mosfets. All options from :ref:`Sensor <config-sensor>`.
Text Sensor
-----------
..code-block:: yaml
# Example configuration entry
text_sensor:
- platform: pylontech
pylontech_id: pylontech0
battery: 1
base_state:
id: bat1_base_state
name: "Battery1 Base State"
Configuration variables:
~~~~~~~~~~~~~~~~~~~~~~~~
-**pylontech_id** (**Optional**): Manually specify the ID of the pylontech instance if there are multiple.
-**battery** (**Required**): Which battery to monitor. 1 stands for the main battery, 2..6 for child batteries.
-**base_state** (*Optional*): Base state. Usually reads ``Dischg``, ``Charge`` or ``Idle``. All options from :ref:`Text Sensor <config-text_sensor>`.
-**voltage_state** (*Optional*): Voltage state. Usually reads ``Normal``. All options from :ref:`Text Sensor <config-text_sensor>`.
-**current_state** (*Optional*): Current state. Usually reads ``Normal``. All options from :ref:`Text Sensor <config-text_sensor>`.
-**temperature_state** (*Optional*): Temperature state. Usually reads ``Normal``. All options from :ref:`Text Sensor <config-text_sensor>`.
Energy Monitoring
-----------------
By combining :doc:`template sensors </components/sensor/template>` and :doc:`integration sensors </components/sensor/integration>`
one can monitor the energy flowing into and out of all batteries combined, ready for `Homeassistant Energy Monitoring <https://www.home-assistant.io/docs/energy/battery/>`__.
..code-block:: yaml
sensor:
- platform: template
id: pylontech_power
name: "Pylontech power"
unit_of_measurement: W
lambda: |-
auto pwr1 = id(bat1_voltage).state * id(bat1_current).state;
auto pwr2 = id(bat2_voltage).state * id(bat2_current).state;