def test_get_warning_text_status_from_indice_color_en() -> None: """Test helpers to have readable alert type and alert level in English.""" assert get_warning_text_status_from_indice_color(4, "en") == "Red" assert get_phenomenon_name_from_indice(4, "en") == "Flood"
def native_value(self): """Return the state.""" return get_warning_text_status_from_indice_color( self.coordinator.data.get_domain_max_color())
def test_text_helpers_fr() -> None: """Test helpers to have readable alert type and alert level in French.""" assert get_warning_text_status_from_indice_color(1) == "Vert" assert get_phenomenon_name_from_indice(2) == "Pluie-inondation"