API:UnitHealth

Get the current percentage health of a unit.
UnitHealth("unit")
== Parameter ==
:;unit
::String - the UnitID (e.g. "target", "party1", "raid1", etc..)
== Returns ==
:;health 
::Integer - current health of the specified unit in health points. Returns nil if the specified unit does not exist (eg. "target" given but there is no target).
== Examples ==
Print your health to the Say channel.
SendChatMessage("My health is " .. UnitHealth("player"),"SAY")
Snipped for health in your addon
local unitId = "player";
local maxHP = UnitMaxHealth(unitId);
local curHP = UnitHealth(unitId);
UnitHealth