def next_setting(hass, entity_id=None):
 utc_next = next_setting_utc(hass, entity_id)
 return (dt_util.as_local(utc_next) if utc_next else None)

def next_setting ( hass , entity_id = None ) : utc_next = next_setting_utc ( hass , entity_id ) return ( dt_util . as_local ( utc_next ) if utc_next else None )
local datetime object of the next sun setting .