Last active
November 10, 2022 09:38
-
-
Save jasonmadigan/69023884aac9dfa621197afea40537bc to your computer and use it in GitHub Desktop.
Home Assistant sensor(s) for Kingspan Watchman SENSiT Oil Tank monitor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sensor(s) for Kingspan Watchman SENSiT Oil Tank monitor: https://www.kingspan.com/ie/en/products/tank-monitoring-systems/remote-tank-monitoring/watchman-sensit/ | |
# Replace email & password in the payload | |
- platform: rest | |
name: Oil Tank | |
resource: https://www.connectsensor.com/soap/MobileApp.asmx | |
method: POST | |
payload: '<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><SoapMobileAPPAuthenicate_v3 xmlns="http://mobileapp/"><emailaddress>[email protected]</emailaddress><password>_PASSWORD_</password></SoapMobileAPPAuthenicate_v3></soap:Body></soap:Envelope>' | |
headers: | |
Content-Type: text/xml | |
charset: UTF-8 | |
value_template: '{{ value_json["soap:Envelope"]["soap:Body"]["SoapMobileAPPAuthenicate_v3Response"]["SoapMobileAPPAuthenicate_v3Result"]["Tanks"]["APITankInfo_V3"]["LevelPercentage"] }}' | |
json_attributes_path: $.['soap:Envelope']['soap:Body']['SoapMobileAPPAuthenicate_v3Response']['SoapMobileAPPAuthenicate_v3Result']['Tanks']['APITankInfo_V3'] | |
json_attributes: | |
- SignalmanNo | |
- TankName | |
- LevelPercentage | |
- LevelLitres | |
- UnitOfMeasurement | |
- Measurement | |
unit_of_measurement: "%" | |
# Two separate sensors for % full and Litres full | |
- platform: template | |
sensors: | |
oil_tank_level_percentage: | |
friendly_name_template: "{{ states.sensor.oil_tank.name}} Level Percentage" | |
value_template: '{{ states.sensor.oil_tank.attributes["LevelPercentage"] | float }}' | |
unit_of_measurement: "%" | |
oil_tank_level_litres: | |
friendly_name_template: "{{ states.sensor.oil_tank.name}} Level Litres" | |
value_template: '{{ states.sensor.oil_tank.attributes["LevelLitres"] | float }}' | |
unit_of_measurement: "L" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment