Very useful thank you - so from my example:
wan:
friendly_name: "Internet Connection"
value_template: "{% if is_state('binary_sensor.WAN_Check_BBC', 'off') and is_state('binary_sensor.WAN_Check_OpenDNS', 'off') %}Offline{% else %}Online{% endif %}"
restart with:
wan:
unique_id: wan
friendly_name: "Internet Connection"
value_template: "{% if is_state('binary_sensor.WAN_Check_BBC', 'off') and is_state('binary_sensor.WAN_Check_OpenDNS', 'off') %}Offline{% else %}Online{% endif %}"
then transitions to the new format as
- name: "Internet Connection"
unique_id: wan
state: "{% if is_state('binary_sensor.WAN_Check_BBC', 'off') and is_state('binary_sensor.WAN_Check_OpenDNS', 'off') %}Offline{% else %}Online{% endif %}"