Availability template in Ping Binary Sensor

Add to Ping Binary Sensor availability template like in Template Sensor

availability [template] (optional, default: true)

Defines a template to get the available state of the component. If the template returns true, the device is available. If the template returns any other value, the device will be unavailable. If not configured, the component will always be available.

Reason: some my ping sensors check connection to other servers behind the VPN connection. But if something wrong with internet or vpn I will receive errors about unresolved host names and so on. With this feature it would be possible use other ping sensor for checking connection and disable updates if it isn’t reachable.